-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
35 lines (33 loc) · 942 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
/*
When running in CI (GitHub Actions), use the GitHub Actions reporter to annotate the PR with any test failures.
Locally, use the default reporter.
See:
- https://jestjs.io/docs/configuration#github-actions-reporter
- https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
*/
const reporters = process.env.GITHUB_ACTIONS
? [['github-actions', { silent: false }], 'summary']
: ['default'];
// eslint-disable-next-line import/no-default-export -- TODO
export default {
reporters,
verbose: true,
testEnvironment: 'node',
projects: [
{
displayName: 'cdk',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFilesAfterEnv: ['<rootDir>/packages/cdk/jest.setup.js'],
testMatch: ['<rootDir>/packages/cdk/**/*.test.ts'],
},
{
displayName: 'lambda',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testMatch: ['<rootDir>/packages/lambda/**/*.test.ts'],
},
],
};