Skip to content

Commit fc82653

Browse files
committed
test(scripts): run the SynthOS node:test suites with node --test
The synthos-companion and synthos-service tests are node:test suites. The scripts package ran them through Vitest, whose default include matches *.test.mjs. Vitest loaded each file, node:test ran the tests in the worker, but no Vitest suite was registered, so every file failed with "No test suite found". Nothing ran them with node --test. The companion's own "node --test" script is in a directory that is not a workspace package, and synthos-service has no package.json. The companion is a standalone npm package installed on device hosts, so converting it to Vitest would break its own npm test. Instead the root config excludes both directories from Vitest, and the scripts package's test task runs them with node --test after Vitest. CI's change mapping already sends scripts/synthos-* to that task. Fails before (CI Test job): 5 files with "No test suite found". Passes after: Vitest 28/28 files and 194 tests (the same neighbours as before), then node --test 45/45. A broken assertion in run.test.mjs makes the task exit 1. Known gap: check:changed passes changed test files to a repo-root vp test run, so a changed companion or service test is now skipped there. CI still runs it through this task. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A1D6J2UMPo7YBWQFvbg1br
1 parent e43316e commit fc82653

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎scripts/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "module",
55
"scripts": {
66
"typecheck": "tsc --noEmit",
7-
"test": "vp test run --config ../vite.config.ts --dir ."
7+
"test": "vp test run --config ../vite.config.ts --dir . && node --test synthos-companion/*.test.mjs synthos-service/*.test.mjs"
88
},
99
"dependencies": {
1010
"@effect/platform-node": "catalog:",

‎vite.config.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const TEST_EXCLUDE = [
1111
"**/dist/**",
1212
"**/dist-electron/**",
1313
"**/.{idea,git,cache,output,temp}/**",
14+
// node:test suites, which Vitest loads but finds no suite in. The scripts
15+
// package's `test` task runs them with `node --test`.
16+
"**/synthos-companion/**",
17+
"**/synthos-service/**",
1418
];
1519

1620
// Directories whose tests belong to a package's own test config. desktop also

0 commit comments

Comments
 (0)