-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.ts
31 lines (29 loc) · 981 Bytes
/
jest.config.ts
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 type { JestConfigWithTsJest } from 'ts-jest';
const jestConfig: JestConfigWithTsJest = {
verbose: true,
extensionsToTreatAsEsm: ['.ts'],
watchPathIgnorePatterns: ['node_modules', 'data', 'coverage', 'dist'],
testPathIgnorePatterns: ['node_modules', 'data', 'coverage', 'dist'],
moduleNameMapper: {
'^nukak/(.+)\\.js$': '<rootDir>/packages/core/src/$1',
'^nukak/(.+)(?<!\\.js)$': '<rootDir>/packages/core/src/$1',
'^(\\.{1,2}/.+)\\.js$': '$1',
},
transform: {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
useESM: true,
},
],
},
setupFilesAfterEnv: ['<rootDir>/config/test-setup-after-env.js'],
testMatch: ['**/*.spec.ts', '**/sqlite/**/*.it.ts'],
collectCoverage: true,
coverageReporters: ['html', 'text-summary', 'lcov'],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: ['node_modules', 'test'],
modulePathIgnorePatterns: ['dist'],
};
export default jestConfig;