forked from virtru/virtuoso-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
28 lines (28 loc) · 919 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
module.exports = {
roots: ['<rootDir>'],
setupFilesAfterEnv: ['<rootDir>/config/test.config.js'],
moduleFileExtensions: ['js', 'ts', 'tsx', 'json'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/lib/__mocks__/fileMock.js',
'\\.css$': 'identity-obj-proxy',
'^@/(.*)$': '<rootDir>/lib/$1',
},
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['./node_modules/'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
},
cacheDirectory: '<rootDir>/node_modules/.cache/jest',
collectCoverageFrom: ['lib/**/*.{js,jsx}', '!**/node_modules/**'],
coverageThreshold: {
// TODO improve test coverage so we can set global thresholds
// global: {
// branches: 80,
// functions: 80,
// lines: 80,
// statements: -10,
// },
},
coverageReporters: ['lcov', 'text-summary'],
};