-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
41 lines (31 loc) · 1.17 KB
/
jest.config.js
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
32
33
34
35
36
37
38
39
40
41
const { join } = require('path');
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
module.exports = {
testEnvironment: 'jsdom',
preset: 'ts-jest',
transform: {
'^.+\\.(t|j)sx?$': ['ts-jest', { tsconfig: 'src/tsconfig.json' }],
},
transformIgnorePatterns: ['node_modules/(?!@folio|ky)'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json'],
testMatch: ['**/src/**/?(*.)test.{js,jsx,ts,tsx}'],
testPathIgnorePatterns: ['/node_modules/'],
reporters: ['default', 'jest-junit'],
coverageReporters: ['lcov', 'text'],
coverageDirectory: './artifacts/coverage-jest/',
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/**/*.test.{ts,tsx}',
'!src/test/**',
'!**/node_modules/**',
],
setupFiles: [join(__dirname, './src/test/setupTests.ts')],
setupFilesAfterEnv: [join(__dirname, './src/test/jest.setup.ts')],
moduleNameMapper: {
'^.+\\.(css|svg)$': 'identity-obj-proxy',
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
uuid: require.resolve('uuid'),
},
slowTestThreshold: 10,
};