Skip to content

Commit 4728a14

Browse files
committed
feat: ts-jest common config
1 parent 5cb9c7f commit 4728a14

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

jest.config.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
module.exports = {
2-
preset: "ts-jest",
3-
testEnvironment: "node",
4-
globals: {
5-
"ts-jest": {
6-
babelConfig: true,
7-
},
8-
},
9-
modulePathIgnorePatterns: ["dist", "jest-ignore"],
2+
...require("./dist/ts-jest"),
3+
modulePathIgnorePatterns: ["dist", "jest-ignore", "test-projects"],
104
projects: [
115
//
126
"<rootDir>",

src/ts-jest.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* common jest config for typescript projects
3+
*/
4+
export default {
5+
preset: "ts-jest",
6+
globals: {
7+
"ts-jest": {
8+
babelConfig: true,
9+
},
10+
},
11+
};

0 commit comments

Comments
 (0)