mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:00:42 +00:00
test: run single-channel extension batches
This commit is contained in:
@@ -120,6 +120,17 @@ describe("createScopedVitestConfig", () => {
|
||||
expect(config.test?.include).toEqual(["example.test.ts"]);
|
||||
});
|
||||
|
||||
it("keeps scoped cli directory filters aligned with repo-root include patterns", () => {
|
||||
const config = createScopedVitestConfig(["extensions/slack/**/*.test.ts"], {
|
||||
argv: ["vitest", "run", "extensions/slack"],
|
||||
dir: "extensions",
|
||||
env: {},
|
||||
passWithNoTests: true,
|
||||
});
|
||||
|
||||
expect(config.test?.include).toEqual(["slack/**/*.test.*"]);
|
||||
});
|
||||
|
||||
it("relativizes scoped include and exclude patterns to the configured dir", () => {
|
||||
const config = createScopedVitestConfig([BUNDLED_PLUGIN_TEST_GLOB], {
|
||||
dir: "extensions",
|
||||
|
||||
@@ -4,7 +4,7 @@ export function createSingleChannelExtensionVitestConfig(
|
||||
extensionId: string,
|
||||
env: Record<string, string | undefined> = process.env,
|
||||
) {
|
||||
return createScopedVitestConfig([`${extensionId}/**/*.test.ts`], {
|
||||
return createScopedVitestConfig([`extensions/${extensionId}/**/*.test.ts`], {
|
||||
dir: "extensions",
|
||||
env,
|
||||
name: `extension-${extensionId}`,
|
||||
|
||||
Reference in New Issue
Block a user