-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.js
20 lines (20 loc) · 875 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
collectCoverageFrom: [ './src/**/*.ts', '!./src/**/*.ts.snap' ],
coverageDirectory: 'test-results',
globals: { 'ts-jest': { tsconfig: 'tsconfig.test.json' } },
moduleDirectories: [ 'node_modules', 'src' ],
moduleFileExtensions: [ 'js', 'jsx', 'ts', 'tsx' ],
moduleNameMapper: { 'test/(.*)': '<rootDir>/test/$1' },
modulePathIgnorePatterns: [ './src/defaults.ts', './src/types.ts' ],
preset: 'ts-jest',
reporters: [
'default',
[ 'jest-junit', { outputDirectory: 'test-results', outputName: 'junit.xml' } ],
],
setupFilesAfterEnv: [ './test/setup.ts', 'jest-extended/all' ],
snapshotResolver: './test/snapshotResolver.ts',
testEnvironment: './test/HermesTestEnvironment.ts',
testMatch: [ '**/*.test.ts' ],
transform: { '^.+\\.(ts|tsx)?$': 'ts-jest' },
};