-
Notifications
You must be signed in to change notification settings - Fork 87
/
jest.config.js
39 lines (38 loc) · 979 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
// @ts-check
/** @type {import('@jest/types').Config.InitialProjectOptions} */
const commonOptions = {
injectGlobals: false,
roots: ['<rootDir>/src'],
setupFilesAfterEnv: ['<rootDir>/scripts/jestSetup.js'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
// in ts-jest, this means skip type checking (we already type check in the build step)
{ isolatedModules: true },
],
},
testEnvironment: 'node',
};
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
reporters: ['default', 'github-actions'],
testTimeout: 60000,
projects: [
{
displayName: 'unit',
testMatch: ['**/__(tests|fixtures)__/**/*.test.ts'],
...commonOptions,
},
{
displayName: 'functional',
testMatch: ['**/__functional__/**/*.test.ts'],
...commonOptions,
},
{
displayName: 'e2e',
testMatch: ['**/__e2e__/**/*.test.ts'],
...commonOptions,
},
],
};
module.exports = config;