-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
39 lines (39 loc) · 1.04 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
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
snapshotFormat: {
printBasicPrototype: false,
},
rootDir: '.',
roots: ['<rootDir>'],
modulePathIgnorePatterns: ['<rootDir>/_release'],
collectCoverageFrom: ['<rootDir>/src/**', '!<rootDir>/src/lib/**'],
coverageThreshold: {
global: {
statements: 90,
},
},
modulePathIgnorePatterns: ['<rootDir>/dist', '<rootDir>/_release'],
projects: [
{
displayName: {
color: 'cyan',
name: 'unit',
},
testMatch: ['<rootDir>/test/*.test.ts'],
setupFilesAfterEnv: ['<rootDir>/test/_setup.ts'],
// https://jestjs.io/docs/configuration/#prettierpath-string
prettierPath: require.resolve('prettier-2'),
},
{
displayName: {
color: 'yellow',
name: 'e2e',
},
testMatch: ['<rootDir>/test/e2e/*.test.ts'],
setupFilesAfterEnv: ['<rootDir>/test/_setup.ts'],
prettierPath: require.resolve('prettier-2'),
},
],
};