-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
36 lines (36 loc) · 1.22 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
module.exports = {
testEnvironment: 'jsdom',
preset: 'ts-jest',
testMatch: [
'**/?(*.)+(spec|test).(ts|tsx)'
],
transform: {
'^.+\\.(ts|tsx)$': ['ts-jest', { tsconfig: 'src/tsconfig.json' }],
},
moduleNameMapper: {
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
'^.+\\.(svg)$': '<rootDir>/src/__mocks__/svgrMock.ts',
'^.+\\.(svg)\\?url$': '<rootDir>/src/__mocks__/urlMock.ts',
"^.+.css$": 'identity-obj-proxy',
},
collectCoverageFrom: [
'src/**/*.(ts|tsx)',
'!src/web/setupTests.ts',
'!src/web/app/svgedit/**',
'!src/web/app/actions/beambox/svg-editor.ts',
'!src/web/app/lang/**',
'!src/implementations/**',
'!src/web/app/constants/**',
'!src/web/helpers/potrace/**',
// TODO: write unit test for symbol-maker and remove below line
'!src/web/helpers/symbol-maker.ts',
// FIXME: Failed to collect coverage from dialog-caller currently
'!src/web/app/actions/dialog-caller.tsx',
'!src/**/*.worker.ts',
],
globalSetup: './jest.global-setup.js',
setupFilesAfterEnv: ['./src/web/setupTests.ts', 'jest-canvas-mock'],
moduleDirectories: ['node_modules', 'src/web', 'src'],
coverageReporters: ['text-summary', 'html'],
maxWorkers: '50%',
}