-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
28 lines (22 loc) · 1 KB
/
jest.config.js
File metadata and controls
28 lines (22 loc) · 1 KB
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
export default {
// A list of paths to directories that Jest should use to search for files in
// https://jestjs.io/docs/configuration#roots-arraystring
roots: ['<rootDir>/lib/'],
// The test environment that will be used for testing, jsdom for browser environment
// https://jestjs.io/docs/configuration#testenvironment-string
testEnvironment: 'jsdom',
// Jest transformations
// https://jestjs.io/docs/configuration#transform-objectstring-pathtotransformer--pathtotransformer-object
transform: {
'^.+\\.tsx?$': 'ts-jest', // Transform TypeScript files using ts-jest
},
// Code coverage config
// https://jestjs.io/docs/configuration#collectcoveragefrom-array
coverageDirectory: '<rootDir>/coverage/',
collectCoverageFrom: ['<rootDir>/lib/**/*.{ts,tsx}', '!**/node_modules/**', '!**/*.d.ts'],
coveragePathIgnorePatterns: ['<rootDir>/lib/__utils__/', '<rootDir>/node_modules/'],
verbose: true,
testTimeout: 30000,
testPathIgnorePatterns: ['/__utils__/'],
clearMocks: true,
};