-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
55 lines (52 loc) · 1.37 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
55
// eslint-disable-next-line @typescript-eslint/no-var-requires -- can't use import here
const dotenv = require('dotenv');
// Load environment variables from .env file at the root of the repository
dotenv.config({ path: `${__dirname}/.env` });
const transform = {
'^.+\\.tsx?$': ['esbuild-jest', { target: 'esnext' }],
};
module.exports = {
verbose: true,
testEnvironment: 'node',
projects: [
{
displayName: 'cdk',
transform,
transformIgnorePatterns: [
'node_modules/(?!@guardian/private-infrastructure-config)',
],
setupFilesAfterEnv: [`<rootDir>/packages/cdk/jest.setup.js`],
testMatch: ['<rootDir>/packages/cdk/**/*.test.ts'],
},
{
displayName: 'common',
transform,
testMatch: ['<rootDir>/packages/common/**/*.test.ts'],
},
{
displayName: 'dependency-graph-integrator',
transform,
testMatch: [
'<rootDir>/packages/dependency-graph-integrator/**/*.test.ts',
],
},
{
displayName: 'repocop',
transform,
transformIgnorePatterns: [
'node_modules/(?!@guardian/private-infrastructure-config)',
],
testMatch: ['<rootDir>/packages/repocop/**/*.test.ts'],
},
{
displayName: 'interactive-monitor',
transform,
testMatch: ['<rootDir>/packages/interactive-monitor/**/*.test.ts'],
},
{
displayName: 'snyk-integrator',
transform,
testMatch: ['<rootDir>/packages/snyk-integrator/**/*.test.ts'],
},
],
};