Skip to content

Commit

Permalink
test: use isolatedModules for all ts-jest configs to lower memory foo…
Browse files Browse the repository at this point in the history
…tprint on CI
  • Loading branch information
Hotell committed Apr 24, 2023
1 parent 51767fd commit e9c563e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion apps/react-18-tests-v8/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ if (config.globals) {
// override ts-jest config, otherwise it gets merged
config.globals['ts-jest'] = {
tsconfig: '<rootDir>/tsconfig.spec.json',
diagnostics: { warnOnly: true /* , exclude: ['packages/**'] */ },
// diagnostics: { warnOnly: true /* , exclude: ['packages/**'] */ },
isolatedModules: true,
};
}

Expand Down
2 changes: 1 addition & 1 deletion apps/react-18-tests-v9/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
diagnostics: { warnOnly: true, exclude: ['packages/**'] },
isolatedModules: true,
},
},
transform: {
Expand Down
3 changes: 2 additions & 1 deletion apps/ssr-tests-v9/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module.exports = {
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
diagnostics: false,
// diagnostics: false,
isolatedModules: true,
},
},
transform: {
Expand Down
3 changes: 2 additions & 1 deletion apps/stress-test/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module.exports = {
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
diagnostics: false,
// diagnostics: false,
isolatedModules: true,
},
},
transform: {
Expand Down
3 changes: 2 additions & 1 deletion apps/vr-tests-react-components/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module.exports = {
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.json',
diagnostics: false,
// diagnostics: false,
isolatedModules: true,
},
},
transform: {
Expand Down
3 changes: 2 additions & 1 deletion scripts/jest/src/jest.preset.v8.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion scripts/jest/src/jest.preset.v8.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe(`v8 preset`, () => {
expect.objectContaining({
globals: {
'ts-jest': {
diagnostics: false,
isolatedModules: true,
},
},
moduleDirectories: [
Expand Down

0 comments on commit e9c563e

Please sign in to comment.