-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
39 lines (37 loc) · 1.14 KB
/
jest.config.ts
File metadata and controls
39 lines (37 loc) · 1.14 KB
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
38
39
// /** @type {import('ts-jest').JestConfigWithTsJest} */
// module.exports = {
// preset: 'ts-jest',
// clearMocks: true,
// moduleFileExtensions: ['ts','js'],
// roots: ['<rootDir>'],
// testEnvironment: 'node',
// transform: {
// '^.+\\.ts?$': 'ts-jest',
// },
// setupFilesAfterEnv: ['jest-extended'],
// // setupFiles: ['dotenv/config'],
// globals: {
// 'ts-jest': {
// diagnostics: false,
// },
// },
// globalSetup: '<rootDir>/src/__test__/dbSetup/global-setup.ts',
// globalTeardown: '<rootDir>/src/__test__/dbSetup/global-teardown.ts',
// }
import type { Config } from '@jest/types';
export default async (): Promise<Config.InitialOptions> => {
return {
preset: "ts-jest",
verbose: true,
// setupFilesAfterEnv: ['jest-extended'],
setupFiles: ["dotenv/config"],
testMatch: ["**/**/*.test.ts"],
testEnvironment: "node",
detectOpenHandles: true,
// collectCoverage: true,
transform: { "^.+\\.tsx?$": "ts-jest" },
globalSetup: '<rootDir>/src/__test__/dbSetup/global-setup.ts',
globalTeardown: '<rootDir>/src/__test__/dbSetup/global-teardown.ts',
forceExit: true,
};
};