Skip to content

Commit

Permalink
fix(scripts-jest): update ts-jest configuration introduce in v29
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotell committed May 30, 2023
1 parent 96bb109 commit 9d76764
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions scripts/jest/src/jest.preset.v8.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ const createConfig = (customConfig = {}) => {
},

transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.tsx?$': [
'ts-jest',
{
/** https://kulshekhar.github.io/ts-jest/docs/28.0/getting-started/options/isolatedModules */
isolatedModules: true,
},
],
},

transformIgnorePatterns: ['/node_modules/', '/lib-commonjs/', '\\.js$'],
Expand All @@ -68,13 +74,6 @@ const createConfig = (customConfig = {}) => {
path.resolve(packageRoot, 'node_modules'),
path.resolve(__dirname, '../node_modules'),
],

globals: {
'ts-jest': {
/** https://kulshekhar.github.io/ts-jest/docs/28.0/getting-started/options/isolatedModules */
isolatedModules: true,
},
},
testEnvironmentOptions: {
url: 'http://localhost',
},
Expand Down

0 comments on commit 9d76764

Please sign in to comment.