You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test: a root Vitest config with isolate: false gets no selected command #126
When a Vitest config turns off test isolation, test files share state, so running only some of them is not safe. DiffCI detects this in runtimeIsolationUnsafe: any isolate property whose value is not the literal true marks the config (test-discovery.ts:463). Command synthesis then refuses with Non-isolated or ambiguous Vitest isolation requires full validation (src/planner/test-command.ts:438).
Only the workspace version of this is tested (tests/repo/workspaces.test.ts:82). The single root vitest.config.ts case has no test, so the detection or the refusal could break without CI noticing.
Add tests that build a small temporary repository (see how workspaces.test.ts writes files and calls analyzeRepository), with vitest as a dependency, a root vitest.config.ts and one *.test.ts file. Then call planSelectiveTestCommands for that test file. Cover:
test: { isolate: false }: no commands, refusal reason matches the message above
test: { isolate: process.env.CI !== undefined } (not a literal): same
test: { isolate: true }: a command is emitted and refusalReason is undefined
Done when: these four cases are in tests/planner/test-command.test.ts (or a new file next to it) and pass with npm test. This is a test-only change. Do not change the detection itself.
Setup and conventions are in CONTRIBUTING.md: run npm test, sign off commits with git commit -s (DCO). Comment here if you want to take it, and ask anything.
Activity