-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
jest.config.js
36 lines (34 loc) · 1.14 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
const pkg = require('./package.json');
const workspaces = pkg.workspaces.packages
.filter(x => !x.startsWith('replay') && x !== 'website')
.map(x => x.replace('/*', ''));
module.exports = {
verbose: false,
testMatch: ['**/test/*.test.js'],
testEnvironment: 'node',
collectCoverage: false,
transform: {},
collectCoverageFrom: workspaces.map(x => `${x}/**/*.js`),
coverageReporters: ['text-summary', 'json'],
coveragePathIgnorePatterns: [
'node_modules',
'<rootDir>/testing/*',
'<rootDir>/.*/interfaces/*',
'<rootDir>/.*/interfaces/*.[ts|js]',
'<rootDir>/.*/bin/*.[ts|js]',
'<rootDir>/.*/start.[ts|js]',
'<rootDir>/.*/install.[ts|js]',
'<rootDir>/.*/install/*.[ts|js]',
'<rootDir>/.*/server.[ts|js]',
'<rootDir>/.*/test/.*.js',
'<rootDir>/.*.d.ts',
'<rootDir>/.*.json',
],
globalTeardown: './jest.teardown.js',
globalSetup: './jest.setup.js',
setupFilesAfterEnv: ['./jest.setupPerTest.js'],
testTimeout: 10e3,
reporters: ['default', 'jest-summary-reporter'],
roots: workspaces.map(x => `${x}/`),
moduleDirectories: ['node_modules', ...workspaces.map(x => `${x}/node_modules`)],
};