forked from paypal/paypal-messaging-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
54 lines (54 loc) · 2.09 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
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>'],
globals: {
__ENV__: 'test',
__MESSAGES__: {
__VERSION__: '1.0.0',
__DOMAIN__: {
__TEST__: 'http://localhost.paypal.com:8080'
},
__URI__: {
__MESSAGE__: '/credit-presentment/smart/message',
__MODAL__: '/credit-presentment/smart/modal',
__LOGGER__: '/credit-presentment/log'
}
}
}
};