9 test files import from ../../dist/... — fail without a prior npm run build.
Files:
tests/backend/test-main-gen.test.ts
tests/backend/codegen-control-flow.test.ts
tests/backend/codegen-composite.test.ts
tests/backend/codegen-dynamic-memory.test.ts
tests/backend/codegen-fb.test.ts
tests/backend/codegen-oop.test.ts
tests/backend/codegen-vla.test.ts
tests/library/codesys-import.test.ts
tests/cli/cli-library.test.ts
Fix: replace dist/ with src/ in all import paths.
Why src/ works: vitest uses Vite's native TypeScript pipeline (via vite.config.ts) to transpile .ts files on-the-fly at test time — no compiled dist/ output is needed or used. The vitest config already sets include: ["src/**/*.ts"] for coverage, confirming src/ is the canonical source. Importing from dist/ means tests silently test stale compiled output rather than current source.
9 test files import from
../../dist/...— fail without a priornpm run build.Files:
tests/backend/test-main-gen.test.tstests/backend/codegen-control-flow.test.tstests/backend/codegen-composite.test.tstests/backend/codegen-dynamic-memory.test.tstests/backend/codegen-fb.test.tstests/backend/codegen-oop.test.tstests/backend/codegen-vla.test.tstests/library/codesys-import.test.tstests/cli/cli-library.test.tsFix: replace
dist/withsrc/in all import paths.Why
src/works: vitest uses Vite's native TypeScript pipeline (viavite.config.ts) to transpile.tsfiles on-the-fly at test time — no compileddist/output is needed or used. The vitest config already setsinclude: ["src/**/*.ts"]for coverage, confirmingsrc/is the canonical source. Importing fromdist/means tests silently test stale compiled output rather than current source.