Skip to content

Commit 0d7090e

Browse files
committed
use standard tsconfig and central jest config in node integration test package
1 parent 25f92ad commit 0d7090e

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
const config = {
2-
transform: {
3-
'^.+\\.ts$': 'ts-jest',
4-
},
5-
testEnvironment: 'node',
1+
const baseConfig = require('../../jest.config.js');
2+
3+
module.exports = {
4+
...baseConfig,
65
testMatch: ['**/test.ts'],
7-
moduleFileExtensions: ['js', 'ts'],
86
};
9-
10-
module.exports = config;
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"extends": "../../tsconfig.json",
3+
4+
"include": ["**/*.ts"],
5+
36
"compilerOptions": {
7+
// package-specific options
48
"esModuleInterop": true,
5-
"types": ["jest", "node"]
6-
},
7-
"include": ["**/*.ts", "jest.config.js"],
8-
"exclude": ["node_modules"]
9+
"types": ["node"]
10+
}
911
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
4+
"include": ["**/*.ts"],
5+
6+
"compilerOptions": {
7+
// should include all types from `./tsconfig.json` plus types for all test frameworks used
8+
"types": ["node", "jest"]
9+
10+
// other package-specific, test-specific options
11+
}
12+
}

0 commit comments

Comments
 (0)