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:
@@ -38,7 +38,7 @@ module.exports = {
|
|||||||
setupFiles: ['dotenv/config'],
|
setupFiles: ['dotenv/config'],
|
||||||
testMatch: ['**/*.test.ts'],
|
testMatch: ['**/*.test.ts'],
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': [
|
'^.+\\.[tj]s$': [
|
||||||
'ts-jest',
|
'ts-jest',
|
||||||
{
|
{
|
||||||
useESM: true,
|
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: {
|
moduleNameMapper: {
|
||||||
'^(\\.{1,2}/.*)\\.js$': '$1'
|
'^(\\.{1,2}/.*)\\.js$': '$1'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module.exports = {
|
|||||||
testMatch: ['**/*.test.itg.ts'],
|
testMatch: ['**/*.test.itg.ts'],
|
||||||
testTimeout: 1800000, // 30 minutes
|
testTimeout: 1800000, // 30 minutes
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': [
|
'^.+\\.[tj]s$': [
|
||||||
'ts-jest',
|
'ts-jest',
|
||||||
{
|
{
|
||||||
useESM: true,
|
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: {
|
moduleNameMapper: {
|
||||||
'^(\\.{1,2}/.*)\\.js$': '$1'
|
'^(\\.{1,2}/.*)\\.js$': '$1'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"noEmit": true
|
"noEmit": true,
|
||||||
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user