From fc13ed7bd54d9a947e269dd40faa6a5716154fff Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Wed, 26 Apr 2023 14:29:44 +0200 Subject: [PATCH] test: use `isolatedModules` for all ts-jest configs to lower memory footprint on CI (#27670) * test: use isolatedModules for all ts-jest configs to lower memory footprint on CI * feat(tools): update jest config setup to use isolatedModules --- apps/react-18-tests-v8/jest.config.js | 2 +- apps/react-18-tests-v9/jest.config.js | 2 +- apps/ssr-tests-v9/jest.config.js | 2 +- apps/stress-test/jest.config.js | 2 +- apps/vr-tests-react-components/jest.config.js | 2 +- .../babel-preset-global-context/jest.config.js | 2 +- .../babel-preset-storybook-full-source/jest.config.js | 2 +- packages/react-components/global-context/jest.config.js | 2 +- packages/react-components/keyboard-keys/jest.config.js | 2 +- packages/react-components/priority-overflow/jest.config.js | 2 +- packages/react-components/react-accordion/jest.config.js | 2 +- packages/react-components/react-alert/jest.config.js | 2 +- packages/react-components/react-aria/jest.config.js | 2 +- packages/react-components/react-avatar-context/jest.config.js | 2 +- packages/react-components/react-avatar/jest.config.js | 2 +- packages/react-components/react-badge/jest.config.js | 2 +- packages/react-components/react-breadcrumb/jest.config.js | 2 +- packages/react-components/react-button/jest.config.js | 2 +- packages/react-components/react-card/jest.config.js | 2 +- packages/react-components/react-checkbox/jest.config.js | 2 +- packages/react-components/react-combobox/jest.config.js | 2 +- packages/react-components/react-components/jest.config.js | 2 +- .../react-components/react-conformance-griffel/jest.config.js | 2 +- .../react-components/react-context-selector/jest.config.js | 2 +- .../react-data-grid-react-window/jest.config.js | 2 +- .../react-components/react-datepicker-compat/jest.config.js | 2 +- packages/react-components/react-dialog/jest.config.js | 2 +- packages/react-components/react-divider/jest.config.js | 2 +- packages/react-components/react-drawer/jest.config.js | 2 +- packages/react-components/react-field/jest.config.js | 2 +- packages/react-components/react-image/jest.config.js | 2 +- packages/react-components/react-infobutton/jest.config.js | 2 +- packages/react-components/react-input/jest.config.js | 2 +- packages/react-components/react-jsx-runtime/jest.config.js | 2 +- packages/react-components/react-label/jest.config.js | 2 +- packages/react-components/react-link/jest.config.js | 2 +- packages/react-components/react-menu/jest.config.js | 2 +- .../react-components/react-migration-v0-v9/jest.config.js | 2 +- .../react-components/react-migration-v8-v9/jest.config.js | 2 +- packages/react-components/react-overflow/jest.config.js | 2 +- packages/react-components/react-persona/jest.config.js | 2 +- packages/react-components/react-popover/jest.config.js | 2 +- .../react-portal-compat-context/jest.config.js | 2 +- packages/react-components/react-portal-compat/jest.config.js | 2 +- packages/react-components/react-portal/jest.config.js | 2 +- packages/react-components/react-positioning/jest.config.js | 2 +- packages/react-components/react-progress/jest.config.js | 2 +- packages/react-components/react-provider/jest.config.js | 2 +- packages/react-components/react-radio/jest.config.js | 2 +- packages/react-components/react-select/jest.config.js | 2 +- .../react-components/react-shared-contexts/jest.config.js | 2 +- packages/react-components/react-skeleton/jest.config.js | 2 +- packages/react-components/react-slider/jest.config.js | 2 +- packages/react-components/react-spinbutton/jest.config.js | 2 +- packages/react-components/react-spinner/jest.config.js | 2 +- .../react-storybook-addon-codesandbox/jest.config.js | 2 +- .../react-components/react-storybook-addon/jest.config.js | 2 +- packages/react-components/react-switch/jest.config.js | 2 +- packages/react-components/react-table/jest.config.js | 2 +- packages/react-components/react-tabs/jest.config.js | 2 +- packages/react-components/react-tabster/jest.config.js | 2 +- packages/react-components/react-tags/jest.config.js | 2 +- packages/react-components/react-text/jest.config.js | 2 +- packages/react-components/react-textarea/jest.config.js | 2 +- packages/react-components/react-theme-sass/jest.config.js | 2 +- packages/react-components/react-theme/jest.config.js | 2 +- packages/react-components/react-toolbar/jest.config.js | 2 +- packages/react-components/react-tooltip/jest.config.js | 2 +- packages/react-components/react-tree/jest.config.js | 2 +- packages/react-components/react-utilities/jest.config.js | 2 +- packages/react-components/react-virtualizer/jest.config.js | 4 ++-- packages/react-components/theme-designer/jest.config.js | 2 +- packages/tokens/jest.config.js | 2 +- scripts/jest/src/jest.preset.v8.js | 3 ++- scripts/jest/src/jest.preset.v8.spec.ts | 2 +- tools/generators/migrate-converged-pkg/index.spec.ts | 2 +- tools/generators/migrate-converged-pkg/index.ts | 2 +- 77 files changed, 79 insertions(+), 78 deletions(-) diff --git a/apps/react-18-tests-v8/jest.config.js b/apps/react-18-tests-v8/jest.config.js index dc4ce5443ae58..b61ba13a65141 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 ff2e84e73010a..08de436edf022 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 3b7292734386e..71f9ab6510d2f 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 3b7292734386e..71f9ab6510d2f 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 ee67c7a86d250..860d9c97635c5 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/packages/react-components/babel-preset-global-context/jest.config.js b/packages/react-components/babel-preset-global-context/jest.config.js index c35f80f6a167e..a962e4119eb6d 100644 --- a/packages/react-components/babel-preset-global-context/jest.config.js +++ b/packages/react-components/babel-preset-global-context/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/babel-preset-storybook-full-source/jest.config.js b/packages/react-components/babel-preset-storybook-full-source/jest.config.js index dafc6e0002a6b..3a35e5b8bdd72 100644 --- a/packages/react-components/babel-preset-storybook-full-source/jest.config.js +++ b/packages/react-components/babel-preset-storybook-full-source/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/global-context/jest.config.js b/packages/react-components/global-context/jest.config.js index 89b83781aad75..cc8d64ae4a43a 100644 --- a/packages/react-components/global-context/jest.config.js +++ b/packages/react-components/global-context/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/keyboard-keys/jest.config.js b/packages/react-components/keyboard-keys/jest.config.js index f4f30182fe771..5e16ee4e6b8d8 100644 --- a/packages/react-components/keyboard-keys/jest.config.js +++ b/packages/react-components/keyboard-keys/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/priority-overflow/jest.config.js b/packages/react-components/priority-overflow/jest.config.js index 5be1fb0250886..994e3d649a430 100644 --- a/packages/react-components/priority-overflow/jest.config.js +++ b/packages/react-components/priority-overflow/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-accordion/jest.config.js b/packages/react-components/react-accordion/jest.config.js index 9d2d508dfbe13..fb3c3825bb3dc 100644 --- a/packages/react-components/react-accordion/jest.config.js +++ b/packages/react-components/react-accordion/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-alert/jest.config.js b/packages/react-components/react-alert/jest.config.js index 7e1223ecf873b..9693d4ad4d9f0 100644 --- a/packages/react-components/react-alert/jest.config.js +++ b/packages/react-components/react-alert/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-aria/jest.config.js b/packages/react-components/react-aria/jest.config.js index aabf1e411b3ec..c5e519a6f36d1 100644 --- a/packages/react-components/react-aria/jest.config.js +++ b/packages/react-components/react-aria/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-avatar-context/jest.config.js b/packages/react-components/react-avatar-context/jest.config.js index a86805833bc25..1d956ea00a0f0 100644 --- a/packages/react-components/react-avatar-context/jest.config.js +++ b/packages/react-components/react-avatar-context/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-avatar/jest.config.js b/packages/react-components/react-avatar/jest.config.js index 474b19047973a..8e485ee197fab 100644 --- a/packages/react-components/react-avatar/jest.config.js +++ b/packages/react-components/react-avatar/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-badge/jest.config.js b/packages/react-components/react-badge/jest.config.js index 2650ceafefa74..c7a12e9171bd8 100644 --- a/packages/react-components/react-badge/jest.config.js +++ b/packages/react-components/react-badge/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-breadcrumb/jest.config.js b/packages/react-components/react-breadcrumb/jest.config.js index e71124efdbbd7..5c481895ec2ff 100644 --- a/packages/react-components/react-breadcrumb/jest.config.js +++ b/packages/react-components/react-breadcrumb/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-button/jest.config.js b/packages/react-components/react-button/jest.config.js index fa9febaae3144..c40bf76983caf 100644 --- a/packages/react-components/react-button/jest.config.js +++ b/packages/react-components/react-button/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-card/jest.config.js b/packages/react-components/react-card/jest.config.js index 718afb7101794..d54241a41570d 100644 --- a/packages/react-components/react-card/jest.config.js +++ b/packages/react-components/react-card/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-checkbox/jest.config.js b/packages/react-components/react-checkbox/jest.config.js index 276dda279da40..fe5acb2984289 100644 --- a/packages/react-components/react-checkbox/jest.config.js +++ b/packages/react-components/react-checkbox/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-combobox/jest.config.js b/packages/react-components/react-combobox/jest.config.js index 42cc3e30eb229..021405129645a 100644 --- a/packages/react-components/react-combobox/jest.config.js +++ b/packages/react-components/react-combobox/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-components/jest.config.js b/packages/react-components/react-components/jest.config.js index 97e86a16f06bf..111eb73ae8db1 100644 --- a/packages/react-components/react-components/jest.config.js +++ b/packages/react-components/react-components/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-conformance-griffel/jest.config.js b/packages/react-components/react-conformance-griffel/jest.config.js index 6023f4a9b558f..73b42aa998da6 100644 --- a/packages/react-components/react-conformance-griffel/jest.config.js +++ b/packages/react-components/react-conformance-griffel/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-context-selector/jest.config.js b/packages/react-components/react-context-selector/jest.config.js index 39023dd6182c6..dcd74005c508f 100644 --- a/packages/react-components/react-context-selector/jest.config.js +++ b/packages/react-components/react-context-selector/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-data-grid-react-window/jest.config.js b/packages/react-components/react-data-grid-react-window/jest.config.js index 7a70c69372d17..5368c2f62c2c4 100644 --- a/packages/react-components/react-data-grid-react-window/jest.config.js +++ b/packages/react-components/react-data-grid-react-window/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-datepicker-compat/jest.config.js b/packages/react-components/react-datepicker-compat/jest.config.js index f3fbfc2d76eb2..023d31b89fd1e 100644 --- a/packages/react-components/react-datepicker-compat/jest.config.js +++ b/packages/react-components/react-datepicker-compat/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-dialog/jest.config.js b/packages/react-components/react-dialog/jest.config.js index 67ac9847a41d8..4057edf6c64b4 100644 --- a/packages/react-components/react-dialog/jest.config.js +++ b/packages/react-components/react-dialog/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-divider/jest.config.js b/packages/react-components/react-divider/jest.config.js index d18346b0729fd..a8098f399f0a5 100644 --- a/packages/react-components/react-divider/jest.config.js +++ b/packages/react-components/react-divider/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-drawer/jest.config.js b/packages/react-components/react-drawer/jest.config.js index 94e954e0a6995..efc18f02183c2 100644 --- a/packages/react-components/react-drawer/jest.config.js +++ b/packages/react-components/react-drawer/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-field/jest.config.js b/packages/react-components/react-field/jest.config.js index a5a95459b194a..5190c367303a7 100644 --- a/packages/react-components/react-field/jest.config.js +++ b/packages/react-components/react-field/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-image/jest.config.js b/packages/react-components/react-image/jest.config.js index 6cc92ea82d5d4..8c23e4216db0e 100644 --- a/packages/react-components/react-image/jest.config.js +++ b/packages/react-components/react-image/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-infobutton/jest.config.js b/packages/react-components/react-infobutton/jest.config.js index 57088d9b82184..1bf9ac3cbf559 100644 --- a/packages/react-components/react-infobutton/jest.config.js +++ b/packages/react-components/react-infobutton/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-input/jest.config.js b/packages/react-components/react-input/jest.config.js index a7110dfad207e..38e8aef2383f6 100644 --- a/packages/react-components/react-input/jest.config.js +++ b/packages/react-components/react-input/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-jsx-runtime/jest.config.js b/packages/react-components/react-jsx-runtime/jest.config.js index b3440c12005ef..160d733973758 100644 --- a/packages/react-components/react-jsx-runtime/jest.config.js +++ b/packages/react-components/react-jsx-runtime/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-label/jest.config.js b/packages/react-components/react-label/jest.config.js index 00d608e89df8b..d8b0c7895c8b9 100644 --- a/packages/react-components/react-label/jest.config.js +++ b/packages/react-components/react-label/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-link/jest.config.js b/packages/react-components/react-link/jest.config.js index ce3f6a490ef56..23277d27bcf9f 100644 --- a/packages/react-components/react-link/jest.config.js +++ b/packages/react-components/react-link/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-menu/jest.config.js b/packages/react-components/react-menu/jest.config.js index 89dddbb7628ac..3b5908251f56f 100644 --- a/packages/react-components/react-menu/jest.config.js +++ b/packages/react-components/react-menu/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-migration-v0-v9/jest.config.js b/packages/react-components/react-migration-v0-v9/jest.config.js index 8e16e3dd157c9..a35b099dddca6 100644 --- a/packages/react-components/react-migration-v0-v9/jest.config.js +++ b/packages/react-components/react-migration-v0-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/packages/react-components/react-migration-v8-v9/jest.config.js b/packages/react-components/react-migration-v8-v9/jest.config.js index 92a09e8740001..c248112b9c0b9 100644 --- a/packages/react-components/react-migration-v8-v9/jest.config.js +++ b/packages/react-components/react-migration-v8-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/packages/react-components/react-overflow/jest.config.js b/packages/react-components/react-overflow/jest.config.js index 461774fbaae0d..1951191f764dd 100644 --- a/packages/react-components/react-overflow/jest.config.js +++ b/packages/react-components/react-overflow/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-persona/jest.config.js b/packages/react-components/react-persona/jest.config.js index 64fccb00346d1..354a58e2ffde3 100644 --- a/packages/react-components/react-persona/jest.config.js +++ b/packages/react-components/react-persona/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-popover/jest.config.js b/packages/react-components/react-popover/jest.config.js index c6dd2288db246..82f46dd78f772 100644 --- a/packages/react-components/react-popover/jest.config.js +++ b/packages/react-components/react-popover/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-portal-compat-context/jest.config.js b/packages/react-components/react-portal-compat-context/jest.config.js index 4f76964fc037d..dfa6b9d19723d 100644 --- a/packages/react-components/react-portal-compat-context/jest.config.js +++ b/packages/react-components/react-portal-compat-context/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-portal-compat/jest.config.js b/packages/react-components/react-portal-compat/jest.config.js index be4da49608cee..4525efa606492 100644 --- a/packages/react-components/react-portal-compat/jest.config.js +++ b/packages/react-components/react-portal-compat/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-portal/jest.config.js b/packages/react-components/react-portal/jest.config.js index dbf98b99ea189..77869cbf6d663 100644 --- a/packages/react-components/react-portal/jest.config.js +++ b/packages/react-components/react-portal/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-positioning/jest.config.js b/packages/react-components/react-positioning/jest.config.js index 2c4d600b111c2..ba952e33e2bb7 100644 --- a/packages/react-components/react-positioning/jest.config.js +++ b/packages/react-components/react-positioning/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-progress/jest.config.js b/packages/react-components/react-progress/jest.config.js index f22d09ca37207..797661d97bfb8 100644 --- a/packages/react-components/react-progress/jest.config.js +++ b/packages/react-components/react-progress/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-provider/jest.config.js b/packages/react-components/react-provider/jest.config.js index aa1e59a8f1e8c..220d2d09f585f 100644 --- a/packages/react-components/react-provider/jest.config.js +++ b/packages/react-components/react-provider/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-radio/jest.config.js b/packages/react-components/react-radio/jest.config.js index c8dc1fb78a935..b43b20471e990 100644 --- a/packages/react-components/react-radio/jest.config.js +++ b/packages/react-components/react-radio/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-select/jest.config.js b/packages/react-components/react-select/jest.config.js index ce2b7e4228dec..040f6a5a8e2b7 100644 --- a/packages/react-components/react-select/jest.config.js +++ b/packages/react-components/react-select/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-shared-contexts/jest.config.js b/packages/react-components/react-shared-contexts/jest.config.js index 232fc8fc07d0c..2463dccb4ea51 100644 --- a/packages/react-components/react-shared-contexts/jest.config.js +++ b/packages/react-components/react-shared-contexts/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-skeleton/jest.config.js b/packages/react-components/react-skeleton/jest.config.js index 0a32212b98d50..1ecf245a63a96 100644 --- a/packages/react-components/react-skeleton/jest.config.js +++ b/packages/react-components/react-skeleton/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-slider/jest.config.js b/packages/react-components/react-slider/jest.config.js index f267c71f237f0..c3527dc791054 100644 --- a/packages/react-components/react-slider/jest.config.js +++ b/packages/react-components/react-slider/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-spinbutton/jest.config.js b/packages/react-components/react-spinbutton/jest.config.js index 4d703b5734aa2..47a29c6c2e390 100644 --- a/packages/react-components/react-spinbutton/jest.config.js +++ b/packages/react-components/react-spinbutton/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-spinner/jest.config.js b/packages/react-components/react-spinner/jest.config.js index 74cc94ecc6bb6..7fd228d7caa3e 100644 --- a/packages/react-components/react-spinner/jest.config.js +++ b/packages/react-components/react-spinner/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-storybook-addon-codesandbox/jest.config.js b/packages/react-components/react-storybook-addon-codesandbox/jest.config.js index 6ebf7bca345a5..804d6a8c53638 100644 --- a/packages/react-components/react-storybook-addon-codesandbox/jest.config.js +++ b/packages/react-components/react-storybook-addon-codesandbox/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-storybook-addon/jest.config.js b/packages/react-components/react-storybook-addon/jest.config.js index a0e17fee3482d..717be5c5306c8 100644 --- a/packages/react-components/react-storybook-addon/jest.config.js +++ b/packages/react-components/react-storybook-addon/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-switch/jest.config.js b/packages/react-components/react-switch/jest.config.js index 7ab58b7b5e477..81ead1f0a2875 100644 --- a/packages/react-components/react-switch/jest.config.js +++ b/packages/react-components/react-switch/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-table/jest.config.js b/packages/react-components/react-table/jest.config.js index 95fa209faa546..d09be1dc61ef3 100644 --- a/packages/react-components/react-table/jest.config.js +++ b/packages/react-components/react-table/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-tabs/jest.config.js b/packages/react-components/react-tabs/jest.config.js index 82f3e969dc35f..2ede66dbfa5c1 100644 --- a/packages/react-components/react-tabs/jest.config.js +++ b/packages/react-components/react-tabs/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-tabster/jest.config.js b/packages/react-components/react-tabster/jest.config.js index 3459449cccb60..5563b6a59af63 100644 --- a/packages/react-components/react-tabster/jest.config.js +++ b/packages/react-components/react-tabster/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-tags/jest.config.js b/packages/react-components/react-tags/jest.config.js index 9b6d68d291110..4d18f3a220ad8 100644 --- a/packages/react-components/react-tags/jest.config.js +++ b/packages/react-components/react-tags/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-text/jest.config.js b/packages/react-components/react-text/jest.config.js index 8e3d3aaf2d53b..810103ae043c5 100644 --- a/packages/react-components/react-text/jest.config.js +++ b/packages/react-components/react-text/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-textarea/jest.config.js b/packages/react-components/react-textarea/jest.config.js index d5255744ad5b2..01e8d7422ca9b 100644 --- a/packages/react-components/react-textarea/jest.config.js +++ b/packages/react-components/react-textarea/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-theme-sass/jest.config.js b/packages/react-components/react-theme-sass/jest.config.js index c87480044d94a..e07cac11ede90 100644 --- a/packages/react-components/react-theme-sass/jest.config.js +++ b/packages/react-components/react-theme-sass/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, testEnvironment: 'jest-environment-node-single-context', diff --git a/packages/react-components/react-theme/jest.config.js b/packages/react-components/react-theme/jest.config.js index ff0a627f6eb09..c7c0c9b227b41 100644 --- a/packages/react-components/react-theme/jest.config.js +++ b/packages/react-components/react-theme/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-toolbar/jest.config.js b/packages/react-components/react-toolbar/jest.config.js index f3bfbe21ad217..1246913f97d58 100644 --- a/packages/react-components/react-toolbar/jest.config.js +++ b/packages/react-components/react-toolbar/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-tooltip/jest.config.js b/packages/react-components/react-tooltip/jest.config.js index 3c184b0adf74f..0a11228e23599 100644 --- a/packages/react-components/react-tooltip/jest.config.js +++ b/packages/react-components/react-tooltip/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-tree/jest.config.js b/packages/react-components/react-tree/jest.config.js index 387ed673bf25f..164d5ddfb8b50 100644 --- a/packages/react-components/react-tree/jest.config.js +++ b/packages/react-components/react-tree/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-utilities/jest.config.js b/packages/react-components/react-utilities/jest.config.js index ad0713da7e648..1b8b528f2a67f 100644 --- a/packages/react-components/react-utilities/jest.config.js +++ b/packages/react-components/react-utilities/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/react-virtualizer/jest.config.js b/packages/react-components/react-virtualizer/jest.config.js index 606059485bce0..406a515d1ffd1 100644 --- a/packages/react-components/react-virtualizer/jest.config.js +++ b/packages/react-components/react-virtualizer/jest.config.js @@ -4,12 +4,12 @@ * @type {import('@jest/types').Config.InitialOptions} */ module.exports = { - displayName: 'virtualizer', + displayName: 'react-virtualizer', preset: '../../../jest.preset.js', globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/react-components/theme-designer/jest.config.js b/packages/react-components/theme-designer/jest.config.js index 37c42ffb59b17..a3449c2a84753 100644 --- a/packages/react-components/theme-designer/jest.config.js +++ b/packages/react-components/theme-designer/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/packages/tokens/jest.config.js b/packages/tokens/jest.config.js index da133e64d8051..993f094b4e144 100644 --- a/packages/tokens/jest.config.js +++ b/packages/tokens/jest.config.js @@ -9,7 +9,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.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 923340801552b..76b407bac07c9 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 a42e8bba60ff6..b9efa27ab56b5 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: [ diff --git a/tools/generators/migrate-converged-pkg/index.spec.ts b/tools/generators/migrate-converged-pkg/index.spec.ts index 791f9259613e9..d2dab0a582d98 100644 --- a/tools/generators/migrate-converged-pkg/index.spec.ts +++ b/tools/generators/migrate-converged-pkg/index.spec.ts @@ -442,7 +442,7 @@ describe('migrate-converged-pkg generator', () => { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: { diff --git a/tools/generators/migrate-converged-pkg/index.ts b/tools/generators/migrate-converged-pkg/index.ts index bbcbce992dc21..e5677aaa2216a 100644 --- a/tools/generators/migrate-converged-pkg/index.ts +++ b/tools/generators/migrate-converged-pkg/index.ts @@ -301,7 +301,7 @@ const templates = { globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json', - diagnostics: false, + isolatedModules: true, }, }, transform: {