Skip to content

Commit dfb746d

Browse files
committed
fix tsconfig for esm compat
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent b3e983d commit dfb746d

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

jest.config.itg.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,19 @@ module.exports = {
2121
testMatch: ['**/*.test.itg.ts'],
2222
testTimeout: 1800000, // 30 minutes
2323
transform: {
24-
'^.+\\.ts$': 'ts-jest'
24+
'^.+\\.ts$': [
25+
'ts-jest',
26+
{
27+
isolatedModules: true,
28+
diagnostics: {warnOnly: true},
29+
tsconfig: {
30+
allowJs: true,
31+
esModuleInterop: true
32+
}
33+
}
34+
]
2535
},
36+
transformIgnorePatterns: ['/node_modules/(?!(@octokit|universal-user-agent|before-after-hook)/)'],
2637
moduleNameMapper: {
2738
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
2839
},

jest.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,19 @@ module.exports = {
3838
setupFiles: ['dotenv/config'],
3939
testMatch: ['**/*.test.ts'],
4040
transform: {
41-
'^.+\\.ts$': 'ts-jest'
41+
'^.+\\.ts$': [
42+
'ts-jest',
43+
{
44+
isolatedModules: true,
45+
diagnostics: {warnOnly: true},
46+
tsconfig: {
47+
allowJs: true,
48+
esModuleInterop: true
49+
}
50+
}
51+
]
4252
},
53+
transformIgnorePatterns: ['/node_modules/(?!(@octokit|universal-user-agent|before-after-hook)/)'],
4354
moduleNameMapper: {
4455
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
4556
},

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"noImplicitAny": false,
1515
"resolveJsonModule": true,
1616
"useUnknownInCatchVariables": false,
17+
"skipLibCheck": true
1718
},
1819
"exclude": [
1920
"./__mocks__/**/*",

0 commit comments

Comments
 (0)