-
-
Notifications
You must be signed in to change notification settings - Fork 252
Expand file tree
/
Copy pathjest.config.js
More file actions
28 lines (28 loc) · 859 Bytes
/
Copy pathjest.config.js
File metadata and controls
28 lines (28 loc) · 859 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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
roots: ['<rootDir>/frontend'],
testMatch: [
'<rootDir>/frontend/**/__tests__/**/*.{test,spec}.{js,jsx,ts,tsx}',
'<rootDir>/frontend/**/*.(test|spec).{js,jsx,ts,tsx}'
],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
setupFilesAfterEnv: ['<rootDir>/frontend/__tests__/setup.ts'],
moduleNameMapper: {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'^@/(.*)$': '<rootDir>/frontend/$1'
},
collectCoverageFrom: [
'frontend/**/*.{ts,tsx}',
'!frontend/**/*.d.ts',
'!frontend/index.tsx',
'!frontend/**/__tests__/**',
'!frontend/**/node_modules/**'
],
coverageDirectory: 'coverage-frontend',
coverageReporters: ['text', 'lcov', 'html']
};