forked from rosedu/workshop-soft-eng
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
23 lines (20 loc) · 809 Bytes
/
jest.config.ts
File metadata and controls
23 lines (20 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { pathsToModuleNameMapper } from "ts-jest/utils";
const { compilerOptions } = require("./tsconfig");
export default {
roots: ['<rootDir>/app', '<rootDir>/test/jest'],
collectCoverage: true,
coverageDirectory: 'coverage',
coverageProvider: 'v8',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' } ),
testPathIgnorePatterns: [
'/node_modules/',
'/dist/', // Ignore the output directory
'/build/', // Ignore any build directory if used
'\\.js$', // Ignore .js test files if they are in the same directories as .ts tests
],
// Optionally specify testMatch to explicitly look for only TypeScript files
testMatch: ["**/?(*.)+(spec|test).ts?(x)"], // Only `.ts` and `.tsx` files
};