-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathjest.config.js
41 lines (34 loc) · 961 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
36
37
38
39
40
41
import {defaults} from 'jest-config';
export default {
notify: true,
notifyMode: 'failure-success',
collectCoverage: true,
coverageReporters: process.env.CI ? ['lcov'] : ['text', 'text-summary', 'html'], // eslint-disable-line no-process-env
collectCoverageFrom: [
'packages/*/src/**/*.{js,jsx,ts,tsx}',
],
projects: [
{
displayName: 'test',
testEnvironment: 'jsdom',
setupFilesAfterEnv: [
'<rootDir>/.jest-setup.ts',
],
transform: {
'^.+\\.[jt]sx?$': ['esbuild-jest', {sourcemap: true}],
},
transformIgnorePatterns: ['/node_modules/(?!(dnd-core|@?react-dnd.*)/)'],
moduleNameMapper: {
'^@mocks/(.*)$': '<rootDir>/__mocks__/$1',
},
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'],
},
{
displayName: 'lint',
runner: 'jest-runner-eslint',
testRegex: [
'/.*\\.[jt]sx?$',
],
},
],
};