forked from rogerpadilla/nukak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
30 lines (28 loc) · 888 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
import type { JestConfigWithTsJest } from 'ts-jest';
const jestConfig: JestConfigWithTsJest = {
verbose: true,
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(nukak)/(.+)\\.js$': '<rootDir>/packages/$1/src/$2',
'^(nukak)/(.+)(?<!\\.js)$': '<rootDir>/packages/$1/src/$2',
'^(\\.{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'],
testPathIgnorePatterns: ['node_modules', 'dist'],
collectCoverage: true,
coverageReporters: ['html', 'text-summary', 'lcov'],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: ['node_modules', 'test'],
modulePathIgnorePatterns: ['dist'],
};
export default jestConfig;