What's wrong
vitest.config.ts's unit project excludes the entire src/browser/**/*.test.ts glob:
{
test: {
name: 'unit',
include: ['src/**/*.test.ts'],
exclude: ['src/browser/**/*.test.ts'],
sequence: { groupOrder: 0 },
},
},
This was added in the #216 plugin-migration merge (commit 0470ac43). No other configured project picks up the slack:
plugin only includes plugins/*/test/**/*.test.{ts,js}
e2e-fixed-port / e2e only include specific named files under tests/e2e/
smoke only includes tests/smoke/**/*.test.ts
I checked every job in .github/workflows/*.yml that runs vitest (unit, plugin, smoke, e2e, e2e-fixed-port, plus the bun variant) — none of them cover src/browser/**.
Impact
find src/browser -name "*.test.ts" | wc -l → 44 test files, including verify-fixture.test.ts, cdp.test.ts, analyze.test.ts, snapshot/*.test.ts, run/*.test.ts, runtime/local-cloak/*.test.ts, etc. None of these run under npm test, npm run test:all (still project-scoped via the same config), or any CI job. Regressions in this whole subsystem currently won't be caught automatically.
Confirmed locally: running any of these files under an ad-hoc vitest config (bypassing the project filters) passes fine — so they're not failing, they're just not being invoked.
Suggested fix
Either narrow the unit project's exclude to whatever specifically motivated it during the #216 migration (if only some browser tests needed temporary exclusion), or add an explicit project/include that covers src/browser/**/*.test.ts (mirroring unit's config, or its own project if these need different setup).
Context
Found while verifying test coverage for #230 (--max-top-level-keys fix), which added tests to src/browser/verify-fixture.test.ts — those tests are correct (verified via a standalone ad-hoc vitest config) but currently don't execute in CI due to this exclusion.
What's wrong
vitest.config.ts'sunitproject excludes the entiresrc/browser/**/*.test.tsglob:This was added in the #216 plugin-migration merge (commit
0470ac43). No other configured project picks up the slack:pluginonly includesplugins/*/test/**/*.test.{ts,js}e2e-fixed-port/e2eonly include specific named files undertests/e2e/smokeonly includestests/smoke/**/*.test.tsI checked every job in
.github/workflows/*.ymlthat runs vitest (unit,plugin,smoke,e2e,e2e-fixed-port, plus the bun variant) — none of them coversrc/browser/**.Impact
find src/browser -name "*.test.ts" | wc -l→ 44 test files, includingverify-fixture.test.ts,cdp.test.ts,analyze.test.ts,snapshot/*.test.ts,run/*.test.ts,runtime/local-cloak/*.test.ts, etc. None of these run undernpm test,npm run test:all(still project-scoped via the same config), or any CI job. Regressions in this whole subsystem currently won't be caught automatically.Confirmed locally: running any of these files under an ad-hoc vitest config (bypassing the project filters) passes fine — so they're not failing, they're just not being invoked.
Suggested fix
Either narrow the
unitproject's exclude to whatever specifically motivated it during the #216 migration (if only some browser tests needed temporary exclusion), or add an explicit project/include that coverssrc/browser/**/*.test.ts(mirroringunit's config, or its own project if these need different setup).Context
Found while verifying test coverage for #230 (
--max-top-level-keysfix), which added tests tosrc/browser/verify-fixture.test.ts— those tests are correct (verified via a standalone ad-hoc vitest config) but currently don't execute in CI due to this exclusion.