-
Notifications
You must be signed in to change notification settings - Fork 57
/
jest.config.js
40 lines (40 loc) · 1.66 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
module.exports = {
reporters: [
'default',
[
'jest-html-reporter',
{
pageTitle: 'Unit Tests - PayPal Messaging Components',
outputPath: './tests/__reports__/unit.html',
// outputs detailed message for complete suite failures
includeSuiteFailure: true,
// outputs detailed message for test failure
includeFailureMsg: true
}
]
],
testEnvironment: 'jest-environment-jsdom-sixteen',
testMatch: ['<rootDir>/tests/unit/**/?(*.)test.js?(x)'],
moduleNameMapper: {
'^src/(.*)': '<rootDir>/src/$1',
'^server/(.*)': '<rootDir>/src/server/$1',
'^utils/(.*)': '<rootDir>/tests/unit/utils/$1',
'@krakenjs/zalgo-promise/src': '@krakenjs/zalgo-promise',
'@krakenjs/zoid/src': '@krakenjs/zoid',
'@krakenjs/jsx-pragmatic/src': '@krakenjs/jsx-pragmatic',
'@paypal/sdk-client/src': '@paypal/sdk-client',
'@paypal/sdk-constants/src': '@paypal/sdk-constants',
'@paypal/sdk-logos/src': '@paypal/sdk-logos',
'@krakenjs/belter/src': '@krakenjs/belter',
'@krakenjs/beaver-logger/src': '@krakenjs/beaver-logger'
},
collectCoverageFrom: ['./src/**'],
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.scss$': '<rootDir>/tests/unit/utils/sassLoader.js',
'^.+\\.(html|css)$': '<rootDir>/tests/unit/utils/rawLoader.js'
},
setupFilesAfterEnv: ['<rootDir>/tests/unit/utils/setup.js', '<rootDir>/tests/customMatchers.js'],
// grumbler-scripts includes babel-plugin-istanbul
coveragePathIgnorePatterns: ['<rootDir>']
};