mirror of https://github.com/mifi/lossless-cut
Exclude the tsc build output from vitest instead of from the build
Excluding src/common tests from tsconfig.common.json kept vitest from running the compiled copies twice, but it also meant those test files were no longer type checked at all by `tsc --build` (eslint only catches lint issues, not type errors). Exclude common-ts-dist from test discovery instead, so the tests are both type checked and run exactly once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YCf7BBiPqNLUjVoN7rTCF6pull/2874/merge
parent
ca6813f9a4
commit
273ec3b1ce
@ -0,0 +1,9 @@
|
||||
import { configDefaults, defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
// `tsc --build` compiles src/common (tests included) into common-ts-dist. Don't discover those
|
||||
// compiled copies, or every test in src/common would also run a second time from the build output.
|
||||
exclude: [...configDefaults.exclude, 'common-ts-dist/**'],
|
||||
},
|
||||
});
|
||||
Loading…
Reference in New Issue