-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest-client.config.js
29 lines (29 loc) · 985 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
module.exports = {
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/(components|modules)/.*(\\.|/)(test|spec))\\.(tsx?|ts?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
modulePathIgnorePatterns: ['.next'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/test/__mocks__/fileMock.js',
'\\.(css|scss)$': 'identity-obj-proxy',
},
collectCoverage: true,
collectCoverageFrom: [
'modules/*.{js,jsx,ts,tsx}',
'components/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
],
coverageReporters: ['json', 'lcov', 'text', 'text-summary'],
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
globals: {
'ts-jest': {
diagnostics: false,
babelConfig: '.babelrc',
tsConfig: './jest-tsconfig.json',
},
},
rootDir: process.cwd(),
};