forked from VolunChain/VolunChain-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
37 lines (35 loc) · 903 Bytes
/
jest.config.ts
File metadata and controls
37 lines (35 loc) · 903 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
37
import { config } from "dotenv";
config({ path: ".env.test" });
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
preset: "ts-jest",
testEnvironment: "node",
roots: ["<rootDir>/tests", "<rootDir>/src"],
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "./tsconfig.json",
},
],
},
testMatch: [
"**/tests/**/*.test.ts",
"**/__tests__/**/*.test.ts",
"(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
"**/src/**/__tests__/**/*.test.ts",
"**/src/**/*.test.ts",
],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
"^@prisma/client$": "<rootDir>/tests/__mocks__/prisma.ts",
},
collectCoverageFrom: [
"src/**/*.{js,ts}",
"!**/node_modules/**",
"!**/tests/**",
],
coverageDirectory: "coverage",
testTimeout: 30000,
};