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

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
J
Java Code Geeks
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
量子位
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
A
About on SuperTechFans
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
腾讯CDC
I
InfoQ
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
爱范儿
爱范儿

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
test: tighten unit vitest config assertions · openclaw/op...
steipete · 2026-05-09 · via Recent Commits to openclaw:main

@@ -87,14 +87,15 @@ describe("unit vitest config", () => {

8787

it("keeps acp and ui tests out of the generic unit lane", () => {

8888

const unitConfig = createUnitVitestConfig({});

8989

const testConfig = requireTestConfig(unitConfig);

90-

expect(testConfig.exclude).toEqual(expect.arrayContaining(["extensions/**", "test/**"]));

91-

expect(testConfig.include).not.toEqual(

92-

expect.arrayContaining([

93-

"ui/src/ui/app-chat.test.ts",

94-

"ui/src/ui/chat/**/*.test.ts",

95-

"ui/src/ui/views/chat.test.ts",

96-

]),

97-

);

90+

expect(testConfig.exclude).toContain("extensions/**");

91+

expect(testConfig.exclude).toContain("test/**");

92+

for (const pattern of [

93+

"ui/src/ui/app-chat.test.ts",

94+

"ui/src/ui/chat/**/*.test.ts",

95+

"ui/src/ui/views/chat.test.ts",

96+

]) {

97+

expect(testConfig.include).not.toContain(pattern);

98+

}

9899

});

99100100101

it("narrows the active include list to CLI file filters when present", () => {

@@ -126,35 +127,27 @@ describe("unit vitest config", () => {

126127

},

127128

);

128129

const testConfig = requireTestConfig(unitConfig);

129-

expect(testConfig.exclude).toEqual(

130-

expect.arrayContaining(["src/commands/**", "src/config/**", "src/security/**"]),

131-

);

130+

expect(testConfig.exclude).toContain("src/commands/**");

131+

expect(testConfig.exclude).toContain("src/config/**");

132+

expect(testConfig.exclude).toContain("src/security/**");

132133

});

133134134135

it("scopes default coverage to source files owned by the unit lane", () => {

135136

const unitConfig = createUnitVitestConfig({});

136137

const testConfig = requireTestConfig(unitConfig);

137138

const coverageInclude = testConfig.coverage?.include;

138-

expect(coverageInclude).toEqual(

139-

expect.arrayContaining([

140-

"src/commitments/runtime.ts",

141-

"src/media-generation/runtime-shared.ts",

142-

"src/web-search/runtime.ts",

143-

]),

144-

);

145-

expect(coverageInclude).not.toEqual(

146-

expect.arrayContaining(["src/markdown/render.ts", "src/security/audit-workspace-skills.ts"]),

147-

);

139+

expect(coverageInclude).toContain("src/commitments/runtime.ts");

140+

expect(coverageInclude).toContain("src/media-generation/runtime-shared.ts");

141+

expect(coverageInclude).toContain("src/web-search/runtime.ts");

142+

expect(coverageInclude).not.toContain("src/markdown/render.ts");

143+

expect(coverageInclude).not.toContain("src/security/audit-workspace-skills.ts");

148144

});

149145150146

it("derives default coverage includes from non-fast unit tests with sibling source files", () => {

151-

expect(resolveDefaultUnitCoverageIncludePatterns()).toEqual(

152-

expect.arrayContaining([

153-

"packages/memory-host-sdk/src/host/embeddings.ts",

154-

"src/commitments/store.ts",

155-

"src/tools/planner.ts",

156-

]),

157-

);

147+

const coverageInclude = resolveDefaultUnitCoverageIncludePatterns();

148+

expect(coverageInclude).toContain("packages/memory-host-sdk/src/host/embeddings.ts");

149+

expect(coverageInclude).toContain("src/commitments/store.ts");

150+

expect(coverageInclude).toContain("src/tools/planner.ts");

158151

});

159152160153

it("leaves coverage include filters unset for explicit unit include lists", () => {

@@ -187,15 +180,11 @@ describe("unit vitest config", () => {

187180

"src/plugin-sdk/facade-runtime.test.ts",

188181

"src/plugins/loader.test.ts",

189182

]);

190-

expect(testConfig.exclude).not.toEqual(

191-

expect.arrayContaining([

192-

"src/infra/**",

193-

"src/plugin-sdk/**",

194-

"src/plugins/**",

195-

"src/infra/matrix-plugin-helper.test.ts",

196-

"src/plugin-sdk/facade-runtime.test.ts",

197-

"src/plugins/loader.test.ts",

198-

]),

199-

);

183+

expect(testConfig.exclude).not.toContain("src/infra/**");

184+

expect(testConfig.exclude).not.toContain("src/plugin-sdk/**");

185+

expect(testConfig.exclude).not.toContain("src/plugins/**");

186+

expect(testConfig.exclude).not.toContain("src/infra/matrix-plugin-helper.test.ts");

187+

expect(testConfig.exclude).not.toContain("src/plugin-sdk/facade-runtime.test.ts");

188+

expect(testConfig.exclude).not.toContain("src/plugins/loader.test.ts");

200189

});

201190

});