-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
46 lines (40 loc) · 1.12 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
37
38
39
40
41
42
43
44
45
46
// jest.config.js
module.exports = {
/**
* Naming the test
*/
displayName: 'Fitfab-UI',
/**
* Verbose console output per test
*/
verbose: true,
/**
* The test environment that will be used for testing
*/
testEnvironment: 'jsdom',
/**
* The transform config just tells jest
* to use ts-jest for ts / tsx files.
*/
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
/**
* The testRegex tells Jest to look for tests in any __tests__ folder
* AND also any files anywhere that use the (.test|.spec).(ts|tsx)
*/
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
/**
* The moduleFileExtensions tells jest to recognize our file extensions.
* This is needed as we add ts/tsx into the defaults (js|jsx|json|node).
*/
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
/**
* setup snapshot support with Enzyme
*/
// snapshotSerializers: ['enzyme-to-json/serializer'],
/***
* Setup React-testing-library
*/
setupFilesAfterEnv: ['<rootDir>/config/rtl.setup.ts'],
}