forked from Workday/canvas-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (33 loc) · 1.02 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
module.exports = {
rootDir: '.',
setupFilesAfterEnv: ['<rootDir>/jest/setupTests.ts'],
verbose: true,
collectCoverage: true,
collectCoverageFrom: [
'modules/**/*.{tsx,ts}',
'!modules/**/*.d.ts',
'!**/header/**/lib/Header.tsx',
'!**/common/**/ControlledComponentWrapper.tsx',
'!**/common/**/InputProviderDecorator.tsx',
'!**/common/**/SectionDecorator.tsx',
'!**/index.{ts,tsx,js,jsx}',
'!**/stories*.{ts,tsx,js,jsx}',
],
coverageReporters: ['text', 'clover', 'html'],
coverageDirectory: '<rootDir>/build/reports/jest',
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
moduleFileExtensions: ['tsx', 'ts', 'js', 'jsx', 'json'],
snapshotSerializers: ['jest-emotion/serializer'],
testMatch: ['**/?(*.)+(spec|test|snapshot).ts?(x)'],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
clearMocks: true,
reporters: ['default', ['jest-junit', {suiteName: 'Canvas Kit tests'}]],
testURL: 'http://localhost',
};