let ts-jest transform JS and allow JS in tests

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2026-01-28 15:06:20 +01:00
parent 13d565c67f
commit 466f0611ff
3 changed files with 6 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ module.exports = {
setupFiles: ['dotenv/config'],
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.ts$': [
'^.+\\.[tj]s$': [
'ts-jest',
{
useESM: true,
@@ -46,7 +46,7 @@ module.exports = {
}
]
},
transformIgnorePatterns: ['/node_modules/(?!(?:@octokit|universal-user-agent)/)'],
transformIgnorePatterns: ['/node_modules/(?!(?:@octokit|universal-user-agent|before-after-hook)/)'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},

View File

@@ -21,7 +21,7 @@ module.exports = {
testMatch: ['**/*.test.itg.ts'],
testTimeout: 1800000, // 30 minutes
transform: {
'^.+\\.ts$': [
'^.+\\.[tj]s$': [
'ts-jest',
{
useESM: true,
@@ -29,7 +29,7 @@ module.exports = {
}
]
},
transformIgnorePatterns: ['/node_modules/(?!(?:@octokit|universal-user-agent)/)'],
transformIgnorePatterns: ['/node_modules/(?!(?:@octokit|universal-user-agent|before-after-hook)/)'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},

View File

@@ -2,7 +2,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": ".",
"noEmit": true
"noEmit": true,
"allowJs": true
},
"include": [
"src/**/*.ts",