diff --git a/.eslintignore b/.eslintignore index 009af54..5498e0f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,2 @@ -dist +build coverage diff --git a/tsconfig.json b/tsconfig.json index d97607f..5d67631 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "include": ["src/**/*.ts"], "compilerOptions": { "rootDir": "src", - "outDir": "dist", + "outDir": "build", "target": "es2022", "module": "es2022", "moduleResolution": "bundler", diff --git a/vitest.config.ts b/vitest.config.ts index 04d9240..17bec1b 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,10 +1,14 @@ import {defineConfig} from 'vitest/config'; +// Tests run on the 'build' output and remap to 'src' with source maps, so we iclude both paths in +// coverage. Istanbul's `config.excludeAfterRemap` option is not exposed by Vitest, so bundled +// dependencies may be shown in the coverage report. Ignore those for now, as we expect bundling +// these dependencies to be temporary. See: https://github.com/vitest-dev/vitest/discussions/5964. export default defineConfig({ test: { coverage: { provider: 'istanbul', - include: ['src/**/*.ts', 'build/**/*'], + include: ['src/**/*', 'build/**/*'], }, }, });