diff --git a/apps/react-18-tests-v8/jest.config.js b/apps/react-18-tests-v8/jest.config.js index dc4ce5443ae587..b61ba13a651417 100644 --- a/apps/react-18-tests-v8/jest.config.js +++ b/apps/react-18-tests-v8/jest.config.js @@ -15,7 +15,7 @@ if (config.globals) { // override ts-jest config, otherwise it gets merged config.globals['ts-jest'] = { tsconfig: '/tsconfig.spec.json', - diagnostics: { warnOnly: true /* , exclude: ['packages/**'] */ }, + isolatedModules: true, }; } diff --git a/apps/react-18-tests-v9/jest.config.js b/apps/react-18-tests-v9/jest.config.js index ff2e84e73010a6..08de436edf022a 100644 --- a/apps/react-18-tests-v9/jest.config.js +++ b/apps/react-18-tests-v9/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: { warnOnly: true, exclude: ['packages/**'] }, + isolatedModules: true, }, }, transform: { diff --git a/apps/ssr-tests-v9/jest.config.js b/apps/ssr-tests-v9/jest.config.js index 3b7292734386e0..71f9ab6510d2fa 100644 --- a/apps/ssr-tests-v9/jest.config.js +++ b/apps/ssr-tests-v9/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/apps/stress-test/jest.config.js b/apps/stress-test/jest.config.js index 3b7292734386e0..71f9ab6510d2fa 100644 --- a/apps/stress-test/jest.config.js +++ b/apps/stress-test/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/apps/vr-tests-react-components/jest.config.js b/apps/vr-tests-react-components/jest.config.js index ee67c7a86d2501..860d9c97635c56 100644 --- a/apps/vr-tests-react-components/jest.config.js +++ b/apps/vr-tests-react-components/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/scripts/jest/src/jest.preset.v8.js b/scripts/jest/src/jest.preset.v8.js index 923340801552b1..76b407bac07c99 100644 --- a/scripts/jest/src/jest.preset.v8.js +++ b/scripts/jest/src/jest.preset.v8.js @@ -71,7 +71,8 @@ const createConfig = (customConfig = {}) => { globals: { 'ts-jest': { - diagnostics: false, + /** https://kulshekhar.github.io/ts-jest/docs/28.0/getting-started/options/isolatedModules */ + isolatedModules: true, }, }, testEnvironmentOptions: { diff --git a/scripts/jest/src/jest.preset.v8.spec.ts b/scripts/jest/src/jest.preset.v8.spec.ts index a42e8bba60ff6e..b9efa27ab56b5b 100644 --- a/scripts/jest/src/jest.preset.v8.spec.ts +++ b/scripts/jest/src/jest.preset.v8.spec.ts @@ -10,7 +10,7 @@ describe(`v8 preset`, () => { expect.objectContaining({ globals: { 'ts-jest': { - diagnostics: false, + isolatedModules: true, }, }, moduleDirectories: [