-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
36 lines (34 loc) · 1005 Bytes
/
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
const path = require('path');
const esModules = ['@folio', 'ky'].join('|');
module.exports = {
testEnvironment: 'jsdom',
preset: 'ts-jest',
collectCoverageFrom: [
'**/(lib|src)/**/*.{ts,tsx}',
'!**/node_modules/**',
'!**/test/jest/**',
],
coverageThreshold: {
global: {
lines: 81
},
},
coverageDirectory: './artifacts/coverage-jest/',
coverageReporters: ['lcov'],
reporters: ['jest-junit', 'default'],
transform: {
'^.+\\.(t|j)sx?$': 'ts-jest',
},
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
moduleNameMapper: {
'^.+\\.(css|svg)$': 'identity-obj-proxy',
},
moduleDirectories: ['node_modules', '<rootDir>'],
testMatch: ['**/(lib|src)/**/?(*.)test.{ts,tsx}'],
testPathIgnorePatterns: ['/node_modules/', '/test/bigtest/', '/test/ui-testing/'],
setupFiles: [
path.join(__dirname, './test/jest/setupTests.ts'),
'jest-canvas-mock'
],
setupFilesAfterEnv: [path.join(__dirname, './test/jest/jest.setup.ts')],
};