Skip to content

Commit f8b47c5

Browse files
committed
test: add tsconfig for Jest testing
1 parent 2cb2881 commit f8b47c5

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

jest.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,13 @@ export default {
2828
testResultsProcessor: 'jest-sonar-reporter',
2929
detectOpenHandles: true,
3030
setupFilesAfterEnv: ['<rootDir>/tests/__mocks__/default.mock.ts'],
31+
transform: {
32+
'^.+\\.ts$': [
33+
'ts-jest',
34+
{
35+
tsconfig: 'tsconfig.test.json',
36+
diagnostics: false,
37+
},
38+
],
39+
}
3140
};

tsconfig.test.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"isolatedModules": true,
5+
"types": ["jest", "node"],
6+
},
7+
"include": [
8+
"tests/**/*.ts",
9+
"src/**/*.ts"
10+
]
11+
}

0 commit comments

Comments
 (0)