-
-
Notifications
You must be signed in to change notification settings - Fork 706
Expand file tree
/
Copy pathvitest.config.mts
More file actions
31 lines (30 loc) · 1.13 KB
/
vitest.config.mts
File metadata and controls
31 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import path from 'node:path'
import { defineConfig } from 'vitest/config'
export default defineConfig({
// TODO: `lib/utils/index.js` loads `@eslint-community/eslint-utils` via CJS `require()`,
// while `.ts` files load it via ESM `import`, causing dual-package hazard where
// `ReferenceTracker.CALL` and other Symbol instances differ between the two copies.
// Force all imports to resolve to the CJS entry so Symbols are identical.
// This can be removed once `lib/utils/index.js` is migrated to TypeScript.
resolve: {
alias: {
'@eslint-community/eslint-utils': path.resolve(
__dirname,
'node_modules/@eslint-community/eslint-utils/index.js'
)
}
},
test: {
include: ['tests/lib/**/*.test.ts', 'tests/integrations/**/*.test.ts'],
exclude: ['**/node_modules/**', '**/dist/**', 'tests/fixtures/**'],
testTimeout: 60_000,
globals: true,
coverage: {
provider: 'v8',
include: ['lib/**/*.{js,ts}'],
exclude: ['tests/**', 'dist/**', 'tools/**', 'node_modules/**'],
reporter: ['text', 'lcov', 'json-summary', 'html'],
reportsDirectory: './coverage'
}
}
})