-
Notifications
You must be signed in to change notification settings - Fork 90
/
jest.config.ts
33 lines (28 loc) · 849 Bytes
/
jest.config.ts
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
/* eslint-disable @typescript-eslint/triple-slash-reference */
/// <reference path="./test/typings/environment.d.ts" />
import type { Config } from 'jest';
import isRunningInCI from './test/util/is-running-in-ci';
const config: Config = {
clearMocks: true,
modulePathIgnorePatterns: ['/dist/'],
resetMocks: true,
resetModules: true,
restoreMocks: true,
setupFiles: ['./test/setup/env-setup.ts'],
setupFilesAfterEnv: ['./test/setup/test-setup.ts'],
testEnvironment: './test/setup/environment.ts',
// node_modules is default.
testPathIgnorePatterns: ['/node_modules/', '/cypress/'],
transform: {
'\\.[jt]sx?$': 'babel-jest',
},
verbose: true,
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
};
if (isRunningInCI()) {
config.maxWorkers = 2;
}
export default config;