#54 follow-up: pretest:e2e cleans out/test (stop stale cross-branch compiled tests running) #56

Merged
benstull merged 1 commits from s54-pretest-clean into main 2026-06-13 16:21:58 +00:00
Owner

Build-hygiene follow-up to #54. tsc -p tsconfig.e2e.json never removes outputs for test sources absent on the current branch, so stale out/test/e2e/suite/*.test.js from other branches were run by the suite glob (caused cross-branch test confusion in session 0048). Adds a clean:e2e script (node fs.rmSync('out/test',{recursive,force})) run between build and tsc in pretest:e2e; cleans ONLY out/test, never the esbuild bundle in out/.\n\nVerified: a planted stale out/test/.../zz.test.js is removed by pretest:e2e; E2E stays green (73 passing + 1 pending, both passes exit 0).

Build-hygiene follow-up to #54. `tsc -p tsconfig.e2e.json` never removes outputs for test sources absent on the current branch, so stale `out/test/e2e/suite/*.test.js` from other branches were run by the suite glob (caused cross-branch test confusion in session 0048). Adds a `clean:e2e` script (node `fs.rmSync('out/test',{recursive,force})`) run between `build` and `tsc` in `pretest:e2e`; cleans ONLY `out/test`, never the esbuild bundle in `out/`.\n\nVerified: a planted stale `out/test/.../zz.test.js` is removed by `pretest:e2e`; E2E stays green (73 passing + 1 pending, both passes exit 0).
benstull added 1 commit 2026-06-13 16:21:56 +00:00
`tsc -p tsconfig.e2e.json` emits to `out/` but never removes outputs for test
sources absent on the current branch, so stale compiled
`out/test/e2e/suite/*.test.js` from other branches were picked up and run by the
suite glob (`**/*.test.js`) — this caused real cross-branch test confusion in
session 0048 (a deleted probe + another branch's tests ran on an unrelated branch).

Add a `clean:e2e` script (`fs.rmSync('out/test', {recursive, force})` via node, so
no shell `rm` dependency) and run it between `build` and `tsc` in `pretest:e2e`.
Cleans ONLY `out/test` — never `out/`, which holds the just-built esbuild bundle
(`out/extension.cjs`, `out/media`).

Verified: planting a stale `out/test/.../zz.test.js` then running `pretest:e2e`
removes it, and the E2E suite stays green (73 passing + 1 pending, both passes
exit 0).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
benstull merged commit 96a689aedf into main 2026-06-13 16:21:58 +00:00
Sign in to join this conversation.