forked from jokingzhang/dantd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
30 lines (30 loc) · 732 Bytes
/
Copy pathjest.config.js
File metadata and controls
30 lines (30 loc) · 732 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
module.exports = {
preset: 'ts-jest',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
globals: {
'ts-jest': {
babelConfig: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
},
testEnvironment: 'jsdom',
testMatch: [
'<rootDir>/src/**/__tests__/**/*.{ts,tsx,js,jsx,mjs}',
'<rootDir>/src/**/?(*.)(spec|test).{ts,tsx,js,jsx,mjs}',
],
reporters: [
'default',
[
'./node_modules/jest-html-reporter',
{
pageTitle: '测试报告',
},
],
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverage: true,
collectCoverageFrom: ['app/react/**/*.{ts,tsx}', '!app/react/__tests__/api/api-test-helpers.ts'],
};