forked from esquireofoz/abacus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.integration.config.js
34 lines (34 loc) · 1.07 KB
/
jest.integration.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
module.exports = {
collectCoverageFrom: [
'<rootDir>/api/**/*.ts',
'!**/node_modules/**',
// FIXME: TODO: Get tests on the following. This is related to issues 52 and 64.
// Currently we are unable to test the following because the code won't hit the
// code branch that leads to this error being thrown. If we test against the
// production API or a more sophisticated mock, then we may be able.
'!<rootDir>/api/UnauthorizedError.ts',
],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
globals: {
// Must specify a custom tsconfig for tests because we need the TypeScript
// transform to transform JSX into js rather than leaving it as JSX which the
// next build requires.
'ts-jest': {
babelConfig: true,
tsConfig: '<rootDir>/tsconfig.jest.json',
},
},
moduleNameMapper: {
'@/(.*)': '<rootDir>/$1',
},
preset: 'ts-jest',
setupFilesAfterEnv: ['isomorphic-fetch'],
testMatch: ['**/__tests__/**/?(*.)+(spec|test).ts?(x)'],
}