forked from yousifalraheem/rollup-plugin-summary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
29 lines (26 loc) · 897 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
28
29
import { InitialOptionsTsJest } from "ts-jest";
const esModules = ["gzip-size"].join("|");
const config: InitialOptionsTsJest = {
roots: ["<rootDir>/src"],
collectCoverage: true,
collectCoverageFrom: ["src/**/*.{js,ts}"],
coveragePathIgnorePatterns: [
"node_modules",
"<rootDir>/src/typings",
"<rootDir>/src/__mocks__",
"<rootDir>/src/__tests__",
],
testMatch: ["<rootDir>/src/**/__tests__/**/*.{js,ts}", "<rootDir>/**/*.{spec,test}.{js,ts}"],
testPathIgnorePatterns: ["node_modules"],
modulePathIgnorePatterns: ["<rootDir>/src/__tests__/setupTests.ts"],
preset: "ts-jest",
testEnvironment: "node",
verbose: true,
transform: {
"^.+\\.ts$": "ts-jest",
"^.+\\.js$": "babel-jest",
},
transformIgnorePatterns: [`<rootDir>/node_modules/(?!${esModules})`],
setupFilesAfterEnv: ["<rootDir>/src/__tests__/setupTests.ts"],
};
export default config;