-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathjest.config.js
63 lines (52 loc) · 1.69 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
// Automatically clear mock calls and instances between every test
clearMocks: true,
// The directory where Jest should output its coverage files
coverageDirectory: "coverage",
// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: [
'/node_modules/',
'/templates/',
'/tests/mocks',
'/tests/setup.js',
'/app/js/openmrs-owa-labworkflow.jsx',
'/app/js/redux-store.jsx',
'/app/js/export-redux.jsx'
],
// An array of file extensions your modules use
moduleFileExtensions: [
"js",
"jsx"
],
// A map from regular expressions to module names that allow to stub out resources with a single module
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/tests/mocks/fileMock.js',
'\\.(css|scss)$': 'identity-obj-proxy'
},
// The paths to modules that run some code to configure or set up the testing environment before each test
setupFiles: [
'<rootDir>/tests/setup.js',
],
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
snapshotSerializers: [
"enzyme-to-json/serializer"
],
// The glob patterns Jest uses to detect test files
testMatch: [
"**/__tests__/**/*.js?(x)",
"**/?(*.)+(spec|test).js?(x)"
],
"moduleDirectories": [
"node_modules",
],
testPathIgnorePatterns: [
"/cypress/",
],
// node modules dependencies that needs ignoring in tests
transformIgnorePatterns: [
"node_modules/(?!ramda)"
],
};