-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjest.config.mjs
37 lines (37 loc) · 993 Bytes
/
jest.config.mjs
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
/** @type {import('jest').Config} */
export default {
testEnvironment: 'jsdom',
preset: 'ts-jest',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'ts-jest',
},
testMatch: [
'**/__tests__/**/*.(spec|test).(j|t)s?(x)',
'**/?(*.)+(spec|test).(j|t)s?(x)',
],
testPathIgnorePatterns: [
'./node_modules/',
'/node_modules/',
'/lib/',
'<rootDir>/lib/',
'<rootDir>/node_modules/',
],
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
moduleDirectories: [
'node_modules',
// add the directory with the test-utils.tsx file
'utils', // a utility folder
'<rootDir>', // the root directory
],
moduleNameMapper: {
'^__tests__/i18n$': '<rootDir>/__mocks__/i18nForTests.ts',
},
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
};