-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
41 lines (39 loc) · 1.07 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
/** @type {import('jest').Config} */
const config = {
preset: "ts-jest",
verbose: true,
moduleDirectories: ["node_modules", "src"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
moduleNameMapper: {
"@/(.*)$": "<rootDir>/src/$1",
},
roots: ["<rootDir>/"],
rootDir: ".",
testEnvironment: "node",
// testEnvironment: 'jsdom',
testEnvironmentOptions: {
html: `<html lang="ko">
<head></head>
<body>
</body>
</html>`,
},
// testRegex: '.e2e-spec.ts$',
testMatch: [
"<rootDir>/**/*.(test|spec).(js|jsx|ts|tsx)",
"<rootDir>/(tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx))",
],
transform: {
"^.+\\.ts?$": "ts-jest",
},
transformIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/dist/"],
testPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/dist/"],
// testTimeout: 10000,
detectOpenHandles: true,
forceExit: true,
};
module.exports = config;