-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
46 lines (35 loc) · 914 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
36
37
38
39
40
41
42
43
44
45
46
/**
* Configuration for Jest.
*
* @see https://jestjs.io/docs/en/configuration.html
*/
'use strict';
const config = {
collectCoverage: true,
setupTestFrameworkScriptFile: './jest.plugins',
testEnvironment: 'node',
testMatch: [
'**/tests/**/*.js'
],
testPathIgnorePatterns: [
'/mocks/',
'/node_modules/',
'/_config.js',
'/_runner.js',
'/.eslintrc.js'
],
verbose: true
};
/* eslint-disable no-process-env */
if ( process.env.SKIP_INTEGRATION_TESTS ) {
config.testPathIgnorePatterns.push( 'integration-tests' );
}
if ( process.env.SKIP_E2E_TESTS ) {
config.testPathIgnorePatterns.push( 'e2e-tests' );
}
process.env.PORT = 5000;
process.env.SLACK_VERIFICATION_TOKEN = 'abcdef123';
process.env.DATABASE_URL = 'postgres://postgres@localhost:5432/plusplus_tests';
process.env.DATABASE_USE_SSL = false;
/* eslint-enable no-process-env */
module.exports = config;