-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
27 lines (26 loc) · 990 Bytes
/
jest.config.ts
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
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverage: true,
reporters: [
"default",
["jest-junit", { suiteNameTemplate: "{filename}" }],
],
testMatch: ["**/(*.)+(test).?(m)[jt]s?(x)"],
collectCoverageFrom: ['<rootDir>/src/**/*.{ts,js,mjs,tsx,jsx,mts}'],
testPathIgnorePatterns: ["<rootDir>/dist/", "<rootDir>/node_modules/"],
coveragePathIgnorePatterns: ["<rootDir>/dist/", "<rootDir>/node_modules/", "<rootDir>/tests/"],
// start mongo memory server
globalSetup: "<rootDir>/testConfig/globalSetup.ts",
// stop mongo memory server
globalTeardown: "<rootDir>/testConfig/globalTeardown.ts",
// connect/disconnect before/after all tests of a suite, clear database before each test
setupFilesAfterEnv: ["<rootDir>/testConfig/setupFile.ts"],
transform: {
"^.+\\.[t|j]sx?$": "babel-jest"
},
transformIgnorePatterns: [
"/node_modules/(?!bson/)"
]
};