forked from TroyAlford/react-jsx-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
37 lines (36 loc) · 973 Bytes
/
jest.config.js
File metadata and controls
37 lines (36 loc) · 973 Bytes
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
const path = require('path')
module.exports = {
collectCoverageFrom: [
'**/source/**/*.{ts,tsx,js}',
'!**/dist/**',
'!**/node_modules/**',
'!**/*.d.ts',
'!**/*.test.{ts,tsx,js}',
],
coverageDirectory: path.resolve(__dirname, 'test-coverage'),
coverageReporters: ['html', 'lcov'],
coverageThreshold: {
global: { branches: 85, functions: 95, lines: 95, statements: 95 },
},
globals: {
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
},
moduleDirectories: ['node_modules'],
/* eslint-disable sort-keys */
moduleNameMapper: {
'^(.*).scss$': path.resolve(__dirname, 'jest/mock.styles.ts'),
'^(.*).(jpg|png|gif|eot|otf|svg|ttf|woff2?)$': path.resolve(__dirname, 'jest/mock.files.ts'),
},
/* eslint-enable sort-keys */
modulePaths: [
'<rootDir>/mocks',
'<rootDir>/node_modules',
],
setupFilesAfterEnv: [
path.resolve(__dirname, 'jest/jest.setup.ts'),
],
testEnvironment: 'jsdom',
transform: {
'^.+\\.[jt]sx?$': 'babel-jest',
},
}