-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathjest.config.js
More file actions
32 lines (30 loc) · 947 Bytes
/
Copy pathjest.config.js
File metadata and controls
32 lines (30 loc) · 947 Bytes
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
const bail = s => {
throw new Error(s)
}
// until we find a way to avoid `punycode` we suppress the warnings in tests
process.env.NODE_NO_WARNINGS = '1'
module.exports = {
collectCoverage: true,
forceExit: true,
preset: 'ts-jest',
testEnvironment: 'node',
testPathIgnorePatterns: ['/node_modules/', '/dist/', '.yalc'],
transformIgnorePatterns: ['!node_modules/'],
globals: {
__DATABASE__: {
host:
process.env.POSTGRES_TEST_HOST ||
bail('POSTGRES_TEST_HOST is not defined'),
port: parseInt(process.env.POSTGRES_TEST_PORT || '5432'),
username:
process.env.POSTGRES_TEST_USERNAME ||
bail('POSTGRES_TEST_USERNAME is not defined'),
password:
process.env.POSTGRES_TEST_PASSWORD ||
bail('POSTGRES_TEST_PASSWORD is not defined'),
database:
process.env.POSTGRES_TEST_DATABASE ||
bail('POSTGRES_TEST_DATABASE is not defined'),
},
},
}