-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.client.config.js
37 lines (37 loc) · 1018 Bytes
/
jest.client.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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
roots: ['<rootDir>/src/client'],
testMatch: ['**/__tests__/**/*.tsx', '**/?(*.)+(spec|test).tsx'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.jsx?$': 'babel-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'\\.(jpg|jpeg|png|gif|webp|svg)$': '<rootDir>/tests/mocks/fileMock.js',
},
collectCoverage: true,
coverageDirectory: 'coverage/client',
collectCoverageFrom: [
'src/client/**/*.{ts,tsx}',
'!src/client/**/*.d.ts',
'!src/client/**/__tests__/**/*',
'!src/client/index.tsx',
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
setupFilesAfterEnv: [
'@testing-library/jest-dom/extend-expect',
'<rootDir>/tests/client/setupTests.ts',
],
testTimeout: 10000,
reporters: ['default', 'jest-junit'],
};