-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.mjs
More file actions
36 lines (35 loc) · 832 Bytes
/
jest.config.mjs
File metadata and controls
36 lines (35 loc) · 832 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
const config = {
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
isolatedModules: true,
},
],
},
collectCoverageFrom: ['server/**/*.{ts,js,jsx,mjs}'],
coverageReporters: ['cobertura', 'text'],
testMatch: ['<rootDir>/server/**/*.test.{ts,js,jsx,mjs}'],
testEnvironment: 'node',
reporters: [
'default',
[
'jest-junit',
{
outputName: 'unit-tests.xml',
suiteName: 'Unit Tests',
outputDirectory: 'test-results/',
},
],
[
'./node_modules/jest-html-reporter',
{
outputPath: 'test-results/unit-test-reports.html',
},
],
],
moduleFileExtensions: ['web.js', 'js', 'json', 'node', 'ts'],
setupFiles: ['dotenv/config'],
setupFilesAfterEnv: ['./server/test-utils/testSetup.ts'],
};
export default config;