惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
博客园_首页
Google DeepMind News
Google DeepMind News
博客园 - Franky
The GitHub Blog
The GitHub Blog
GbyAI
GbyAI
有赞技术团队
有赞技术团队
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
罗磊的独立博客
IT之家
IT之家
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Jina AI
Jina AI
腾讯CDC
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(test): fail missing explicit test targets · openclaw/...
vincentkoc · 2026-05-24 · via Recent Commits to openclaw:main

@@ -9,6 +9,7 @@ const {

99

buildVitestArgs,

1010

buildVitestRunPlans,

1111

createVitestRunSpecs,

12+

findUnmatchedExplicitTestTargets,

1213

parseTestProjectsArgs,

1314

resolveChangedTargetArgs,

1415

resolveChangedTestTargetPlan,

@@ -62,6 +63,14 @@ const {

6263

pnpmArgs: string[];

6364

watchMode: boolean;

6465

}>;

66+

findUnmatchedExplicitTestTargets: (

67+

args: string[],

68+

cwd?: string,

69+

) => Array<{

70+

target: string;

71+

reason: "glob-matched-no-files" | "path-does-not-exist" | "target-matched-no-test-files";

72+

includePattern?: string;

73+

}>;

6574

parseTestProjectsArgs: (

6675

args: string[],

6776

cwd?: string,

@@ -995,6 +1004,64 @@ describe("test-projects args", () => {

9951004

expect(spec?.env.OPENCLAW_VITEST_INCLUDE_FILE).toBe(spec?.includeFilePath);

9961005

});

99710061007+

it("rejects explicit test file targets that do not exist", () => {

1008+

expect(findUnmatchedExplicitTestTargets(["src/not-a-real-openclaw-test.test.ts"])).toEqual([

1009+

{

1010+

target: "src/not-a-real-openclaw-test.test.ts",

1011+

reason: "path-does-not-exist",

1012+

},

1013+

]);

1014+

});

1015+1016+

it("rejects explicit globs that match no files", () => {

1017+

expect(findUnmatchedExplicitTestTargets(["src/**/not-a-real-openclaw-test.test.ts"])).toEqual([

1018+

{

1019+

target: "src/**/not-a-real-openclaw-test.test.ts",

1020+

reason: "glob-matched-no-files",

1021+

},

1022+

]);

1023+

});

1024+1025+

it("rejects explicit non-test file targets with no sibling tests", () => {

1026+

const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-test-targets-"));

1027+

try {

1028+

fs.mkdirSync(path.join(tempDir, "src", "lonely"), { recursive: true });

1029+

fs.writeFileSync(path.join(tempDir, "src", "lonely", "runtime.ts"), "export {};\n");

1030+1031+

expect(findUnmatchedExplicitTestTargets(["src/lonely/runtime.ts"], tempDir)).toEqual([

1032+

{

1033+

target: "src/lonely/runtime.ts",

1034+

reason: "target-matched-no-test-files",

1035+

includePattern: "src/lonely/**/*.test.ts",

1036+

},

1037+

]);

1038+

} finally {

1039+

fs.rmSync(tempDir, { recursive: true, force: true });

1040+

}

1041+

});

1042+1043+

it("accepts explicit untracked test files that exist on disk", () => {

1044+

const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-test-targets-"));

1045+

try {

1046+

fs.mkdirSync(path.join(tempDir, "src"), { recursive: true });

1047+

fs.writeFileSync(path.join(tempDir, "src", "new.test.ts"), "test('new', () => {});\n");

1048+1049+

expect(findUnmatchedExplicitTestTargets(["src/new.test.ts"], tempDir)).toEqual([]);

1050+

} finally {

1051+

fs.rmSync(tempDir, { recursive: true, force: true });

1052+

}

1053+

});

1054+1055+

it("accepts explicit Vitest config targets routed as whole config runs", () => {

1056+

expect(

1057+

findUnmatchedExplicitTestTargets(["test/vitest/vitest.contracts-channel-surface.config.ts"]),

1058+

).toEqual([]);

1059+

});

1060+1061+

it("accepts sentinel targets routed as whole config runs", () => {

1062+

expect(findUnmatchedExplicitTestTargets(["ui/src/test-helpers/control-ui-e2e.ts"])).toEqual([]);

1063+

});

1064+9981065

it("skips channel contract configs with no matching external include patterns", () => {

9991066

const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-contract-include-"));

10001067

try {