-
Notifications
You must be signed in to change notification settings - Fork 158
/
jest.config.js
35 lines (34 loc) · 1007 Bytes
/
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
/**
* Copyright IBM Corp. 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
module.exports = {
collectCoverage: true,
collectCoverageFrom: ['src/services/**/*.js'],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'html'],
setupFiles: ['<rootDir>/config/jest/setup.js'],
testMatch: [
'<rootDir>/**/__tests__/**/*.js?(x)',
'<rootDir>/**/?(*-)(spec|test).js?(x)',
],
testRunner: 'jest-circus/runner',
testURL: 'http://localhost',
transform: {
'^.+\\.(js|jsx)$': '<rootDir>/config/jest/jsTransform.js',
'^.+\\.s?css$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(js|jsx|css|json)$)': '<rootDir>/config/jest/fileTransform.js',
},
testPathIgnorePatterns: [
'/node_modules/',
'/examples/',
'/config/',
'/lib/',
'/es/',
'/cjs/',
],
moduleFileExtensions: ['js', 'json'],
snapshotSerializers: ['enzyme-to-json/serializer'],
};