diff --git a/dep-graph/dep-graph/jest.config.js b/dep-graph/dep-graph/jest.config.js index cee13c63f5..35d028a001 100644 --- a/dep-graph/dep-graph/jest.config.js +++ b/dep-graph/dep-graph/jest.config.js @@ -4,7 +4,7 @@ module.exports = { setupFilesAfterEnv: ['/src/test-setup.ts'], globals: { 'ts-jest': { - tsConfig: '/tsconfig.spec.json', + tsconfig: '/tsconfig.spec.json', }, }, transform: { diff --git a/e2e/angular/jest.config.js b/e2e/angular/jest.config.js index 91f6b81505..70a360984e 100644 --- a/e2e/angular/jest.config.js +++ b/e2e/angular/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-angular', }; diff --git a/e2e/cli/jest.config.js b/e2e/cli/jest.config.js index 80ea217aac..17c9625da3 100644 --- a/e2e/cli/jest.config.js +++ b/e2e/cli/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-cli', }; diff --git a/e2e/cypress/jest.config.js b/e2e/cypress/jest.config.js index 41b597b471..4646d50566 100644 --- a/e2e/cypress/jest.config.js +++ b/e2e/cypress/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-cypress', }; diff --git a/e2e/gatsby/jest.config.js b/e2e/gatsby/jest.config.js index 20df9ab064..de056a4e29 100644 --- a/e2e/gatsby/jest.config.js +++ b/e2e/gatsby/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-next', }; diff --git a/e2e/jest/jest.config.js b/e2e/jest/jest.config.js index 4ef73deb2b..9799855067 100644 --- a/e2e/jest/jest.config.js +++ b/e2e/jest/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-jest', }; diff --git a/e2e/linter/jest.config.js b/e2e/linter/jest.config.js index 816ca40333..e07ef2a383 100644 --- a/e2e/linter/jest.config.js +++ b/e2e/linter/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-linter', }; diff --git a/e2e/next/jest.config.js b/e2e/next/jest.config.js index 20df9ab064..de056a4e29 100644 --- a/e2e/next/jest.config.js +++ b/e2e/next/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-next', }; diff --git a/e2e/node/jest.config.js b/e2e/node/jest.config.js index c938f163aa..91dcecec75 100644 --- a/e2e/node/jest.config.js +++ b/e2e/node/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-node', }; diff --git a/e2e/node/src/node.test.ts b/e2e/node/src/node.test.ts index 64f6b37a96..4c6671c26f 100644 --- a/e2e/node/src/node.test.ts +++ b/e2e/node/src/node.test.ts @@ -387,7 +387,7 @@ describe('nest libraries', function () { preset: '../../jest.preset.js', globals: { 'ts-jest': { - tsConfig: '/tsconfig.spec.json', + tsconfig: '/tsconfig.spec.json', }, }, testEnvironment: 'node', diff --git a/e2e/nx-plugin/jest.config.js b/e2e/nx-plugin/jest.config.js index 95357dd492..77f43c0922 100644 --- a/e2e/nx-plugin/jest.config.js +++ b/e2e/nx-plugin/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-nx-plugin', }; diff --git a/e2e/react/jest.config.js b/e2e/react/jest.config.js index d27fed803b..5532486965 100644 --- a/e2e/react/jest.config.js +++ b/e2e/react/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-react', }; diff --git a/e2e/storybook/jest.config.js b/e2e/storybook/jest.config.js index ebba572b5a..8646b28164 100644 --- a/e2e/storybook/jest.config.js +++ b/e2e/storybook/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-storybook', }; diff --git a/e2e/web/jest.config.js b/e2e/web/jest.config.js index 4804f561c2..29b5eec327 100644 --- a/e2e/web/jest.config.js +++ b/e2e/web/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-web', }; diff --git a/e2e/workspace/jest.config.js b/e2e/workspace/jest.config.js index 717c548053..e39e1275ce 100644 --- a/e2e/workspace/jest.config.js +++ b/e2e/workspace/jest.config.js @@ -5,6 +5,6 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], maxWorkers: 1, - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'e2e-workspace', }; diff --git a/nx-dev/data-access-documents/jest.config.js b/nx-dev/data-access-documents/jest.config.js index f962ebf495..29c4a48088 100644 --- a/nx-dev/data-access-documents/jest.config.js +++ b/nx-dev/data-access-documents/jest.config.js @@ -4,7 +4,7 @@ module.exports = { displayName: 'nx-dev-data-access-documents', globals: { 'ts-jest': { - tsConfig: '/tsconfig.spec.json', + tsconfig: '/tsconfig.spec.json', }, }, transform: { diff --git a/package.json b/package.json index c2a4dcebce..bf5443fbe6 100644 --- a/package.json +++ b/package.json @@ -219,7 +219,7 @@ "tippy.js": "^6.3.1", "tmp": "~0.2.1", "tree-kill": "1.2.2", - "ts-jest": "26.4.0", + "ts-jest": "26.5.5", "ts-loader": "5.4.5", "ts-node": "9.1.1", "tsconfig-paths": "^3.9.0", diff --git a/packages/angular/jest.config.js b/packages/angular/jest.config.js index 75d31a5263..06971ce142 100644 --- a/packages/angular/jest.config.js +++ b/packages/angular/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'angular', }; diff --git a/packages/cli/jest.config.js b/packages/cli/jest.config.js index cb958ede14..b91365b72f 100644 --- a/packages/cli/jest.config.js +++ b/packages/cli/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'cli', }; diff --git a/packages/create-nx-plugin/jest.config.js b/packages/create-nx-plugin/jest.config.js index 1ec7225bf5..e63b3ac271 100644 --- a/packages/create-nx-plugin/jest.config.js +++ b/packages/create-nx-plugin/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'create-nx-plugin', }; diff --git a/packages/create-nx-workspace/jest.config.js b/packages/create-nx-workspace/jest.config.js index 79062ca720..cb63ee053b 100644 --- a/packages/create-nx-workspace/jest.config.js +++ b/packages/create-nx-workspace/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'create-nx-workspace', }; diff --git a/packages/cypress/jest.config.js b/packages/cypress/jest.config.js index 13140ed28f..044ae4cd1e 100644 --- a/packages/cypress/jest.config.js +++ b/packages/cypress/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'cypress', }; diff --git a/packages/devkit/jest.config.js b/packages/devkit/jest.config.js index cb958ede14..b91365b72f 100644 --- a/packages/devkit/jest.config.js +++ b/packages/devkit/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'cli', }; diff --git a/packages/eslint-plugin-nx/jest.config.js b/packages/eslint-plugin-nx/jest.config.js index 9801a3ddef..9ea70a7183 100644 --- a/packages/eslint-plugin-nx/jest.config.js +++ b/packages/eslint-plugin-nx/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'eslint-plugin-nx', }; diff --git a/packages/express/jest.config.js b/packages/express/jest.config.js index a6ab3486ab..35ce364b49 100644 --- a/packages/express/jest.config.js +++ b/packages/express/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'express', }; diff --git a/packages/gatsby/jest.config.js b/packages/gatsby/jest.config.js index 338780b932..48bca241e3 100644 --- a/packages/gatsby/jest.config.js +++ b/packages/gatsby/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'gatsby', }; diff --git a/packages/jest/jest.config.js b/packages/jest/jest.config.js index bba87a4dd1..8542f01af2 100644 --- a/packages/jest/jest.config.js +++ b/packages/jest/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'jest', }; diff --git a/packages/jest/migrations.json b/packages/jest/migrations.json index c8cff22879..3024f96df3 100644 --- a/packages/jest/migrations.json +++ b/packages/jest/migrations.json @@ -64,6 +64,11 @@ "version": "12.1.0-beta.1", "description": "Update jest-preset-angular to version 8.4.0", "factory": "./src/migrations/update-12-1-0/update-jest-preset-angular" + }, + "update-ts-jest-6-5-5": { + "version": "12.1.0-beta.1", + "description": "Replace tsConfig with tsconfig for ts-jest in jest.config.js", + "factory": "./src/migrations/update-12-1-0/update-ts-jest" } }, "packageJsonUpdates": { @@ -137,6 +142,10 @@ "jest-preset-angular": { "version": "8.4.0", "alwaysAddToPackageJson": false + }, + "ts-jest": { + "version": "26.5.5", + "alwaysAddToPackageJson": false } } } diff --git a/packages/jest/src/generators/jest-project/__snapshots__/jest-project.spec.ts.snap b/packages/jest/src/generators/jest-project/__snapshots__/jest-project.spec.ts.snap index 7e0e5170cb..355cb4877a 100644 --- a/packages/jest/src/generators/jest-project/__snapshots__/jest-project.spec.ts.snap +++ b/packages/jest/src/generators/jest-project/__snapshots__/jest-project.spec.ts.snap @@ -33,7 +33,7 @@ exports[`jestProject --setup-file should have setupFilesAfterEnv and globals.ts- setupFilesAfterEnv: ['/src/test-setup.ts'], globals: { 'ts-jest': { - tsConfig: '/tsconfig.spec.json', + tsconfig: '/tsconfig.spec.json', stringifyContentPathRegex: '\\\\\\\\.(html|svg)$', astTransformers: { before: [ @@ -59,7 +59,7 @@ exports[`jestProject should create a jest.config.js 1`] = ` preset: '../../jest.preset.js', globals: { 'ts-jest': { - tsConfig: '/tsconfig.spec.json', + tsconfig: '/tsconfig.spec.json', } }, coverageDirectory: '../../coverage/libs/lib1', diff --git a/packages/jest/src/generators/jest-project/files/jest.config.js__tmpl__ b/packages/jest/src/generators/jest-project/files/jest.config.js__tmpl__ index 4410847561..a37c109c40 100644 --- a/packages/jest/src/generators/jest-project/files/jest.config.js__tmpl__ +++ b/packages/jest/src/generators/jest-project/files/jest.config.js__tmpl__ @@ -4,7 +4,7 @@ module.exports = { setupFilesAfterEnv: ['/src/test-setup.ts'],<% } %><% if (transformer === 'ts-jest') { %> globals: { 'ts-jest': { - tsConfig: '/tsconfig.spec.json',<%if (setupFile === 'angular') { %> + tsconfig: '/tsconfig.spec.json',<%if (setupFile === 'angular') { %> stringifyContentPathRegex: '\\.(html|svg)$', astTransformers: { before: [ diff --git a/packages/jest/src/generators/jest-project/jest-project.spec.ts b/packages/jest/src/generators/jest-project/jest-project.spec.ts index e7a9c73a8e..2b4a7d28c6 100644 --- a/packages/jest/src/generators/jest-project/jest-project.spec.ts +++ b/packages/jest/src/generators/jest-project/jest-project.spec.ts @@ -270,7 +270,7 @@ describe('jestProject', () => { expect(jestConfig.globals).toEqual({ 'ts-jest': { - tsConfig: '/tsconfig.spec.json', + tsconfig: '/tsconfig.spec.json', }, }); }); diff --git a/packages/jest/src/migrations/update-12-1-0/update-ts-jest.spec.ts b/packages/jest/src/migrations/update-12-1-0/update-ts-jest.spec.ts new file mode 100644 index 0000000000..0a12d63d28 --- /dev/null +++ b/packages/jest/src/migrations/update-12-1-0/update-ts-jest.spec.ts @@ -0,0 +1,85 @@ +import { Tree } from '@angular-devkit/schematics'; +import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { serializeJson } from '@nrwl/workspace'; +import { createEmptyWorkspace } from '@nrwl/workspace/testing'; +import * as path from 'path'; +import { getJestObject } from '../update-10-0-0/require-jest-config'; +import { jestConfigObject } from '../utils/config/legacy/functions'; + +jest.mock('../update-10-0-0/require-jest-config'); +const getJestObjectMock = getJestObject as jest.Mock; + +const jestObject = { + globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, +}; + +describe('update 12.1.0', () => { + let initialTree: Tree; + let schematicRunner: SchematicTestRunner; + const jestConfig = String.raw` + module.exports = ${JSON.stringify(jestObject, null, 2)} + `; + + beforeEach(() => { + getJestObjectMock.mockImplementation((path: string): any => { + if (path.includes('apps/products')) { + return jestObject; + } + }); + + initialTree = createEmptyWorkspace(Tree.empty()); + + initialTree.create('apps/products/jest.config.js', jestConfig); + initialTree.create( + 'apps/products/src/test-setup.ts', + `import 'jest-preset-angular';` + ); + initialTree.overwrite( + 'workspace.json', + serializeJson({ + version: 1, + projects: { + products: { + root: 'apps/products', + sourceRoot: 'apps/products/src', + architect: { + build: { + builder: '@angular-devkit/build-angular:browser', + }, + test: { + builder: '@nrwl/jest:jest', + options: { + jestConfig: 'apps/products/jest.config.js', + passWithNoTests: true, + }, + }, + }, + }, + }, + }) + ); + + schematicRunner = new SchematicTestRunner( + '@nrwl/jest', + path.join(__dirname, '../../../migrations.json') + ); + }); + + it('should update the jest.config files by renaming tsConfig', async (done) => { + await schematicRunner + .runSchematicAsync('update-ts-jest-6-5-5', {}, initialTree) + .toPromise(); + + const jestObject = jestConfigObject( + initialTree, + 'apps/products/jest.config.js' + ); + + expect(jestObject.globals['ts-jest']['tsconfig']).toEqual( + '/tsconfig.spec.json' + ); + expect(jestObject.globals['ts-jest']['tsConfig']).toBeUndefined(); + + done(); + }); +}); diff --git a/packages/jest/src/migrations/update-12-1-0/update-ts-jest.ts b/packages/jest/src/migrations/update-12-1-0/update-ts-jest.ts new file mode 100644 index 0000000000..1667fbef7a --- /dev/null +++ b/packages/jest/src/migrations/update-12-1-0/update-ts-jest.ts @@ -0,0 +1,59 @@ +import { stripIndents } from '@angular-devkit/core/src/utils/literals'; +import { + chain, + Rule, + SchematicContext, + Tree, +} from '@angular-devkit/schematics'; +import { formatFiles, getWorkspace } from '@nrwl/workspace'; +import { appRootPath } from '@nrwl/workspace/src/utilities/app-root'; +import { join } from 'path'; +import { getJestObject } from '../update-10-0-0/require-jest-config'; +import { + addPropertyToJestConfig, + removePropertyFromJestConfig, +} from '../utils/config/legacy/update-config'; + +function updateJestConfig(): Rule { + return async (host: Tree, context: SchematicContext) => { + const workspace = await getWorkspace(host); + + for (const [projectName, project] of workspace.projects) { + for (const [, target] of project.targets) { + if (target.builder !== '@nrwl/jest:jest') { + continue; + } + + const jestConfigPath = target.options.jestConfig as string; + const config = getJestObject(join(appRootPath, jestConfigPath)); + const tsJestConfig = config.globals['ts-jest']; + + if (!tsJestConfig.tsConfig) { + continue; + } + + try { + removePropertyFromJestConfig( + host, + jestConfigPath, + 'globals.ts-jest.tsConfig' + ); + addPropertyToJestConfig( + host, + jestConfigPath, + 'globals.ts-jest.tsconfig', + tsJestConfig.tsConfig + ); + } catch { + context.logger.error( + stripIndents`Unable to update jest.config.js for project ${projectName}.` + ); + } + } + } + }; +} + +export default function update(): Rule { + return chain([updateJestConfig(), formatFiles()]); +} diff --git a/packages/jest/src/utils/versions.ts b/packages/jest/src/utils/versions.ts index 139259efaa..30312c7e1e 100644 --- a/packages/jest/src/utils/versions.ts +++ b/packages/jest/src/utils/versions.ts @@ -1,7 +1,7 @@ export const nxVersion = '*'; export const jestVersion = '26.2.2'; export const jestTypesVersion = '26.0.8'; -export const tsJestVersion = '26.4.0'; +export const tsJestVersion = '26.5.5'; export const babelCoreVersion = '7.12.13'; export const babelPresetEnvVersion = '7.12.13'; diff --git a/packages/linter/jest.config.js b/packages/linter/jest.config.js index 99d78bc409..1166549f33 100644 --- a/packages/linter/jest.config.js +++ b/packages/linter/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'linter', }; diff --git a/packages/nest/jest.config.js b/packages/nest/jest.config.js index fb3fca9202..f3e4e96fb0 100644 --- a/packages/nest/jest.config.js +++ b/packages/nest/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'nest', }; diff --git a/packages/nest/src/schematics/library/library.spec.ts b/packages/nest/src/schematics/library/library.spec.ts index b129a4dda3..b6c0da8521 100644 --- a/packages/nest/src/schematics/library/library.spec.ts +++ b/packages/nest/src/schematics/library/library.spec.ts @@ -509,7 +509,7 @@ describe('lib', () => { preset: '../../jest.preset.js', globals: { 'ts-jest': { - tsConfig: '/tsconfig.spec.json', + tsconfig: '/tsconfig.spec.json', }, }, testEnvironment: 'node', diff --git a/packages/next/jest.config.js b/packages/next/jest.config.js index 5045a99c96..b4b7d0ffb5 100644 --- a/packages/next/jest.config.js +++ b/packages/next/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'next', }; diff --git a/packages/node/jest.config.js b/packages/node/jest.config.js index a3236377a0..ac6509372a 100644 --- a/packages/node/jest.config.js +++ b/packages/node/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'node', }; diff --git a/packages/nx-plugin/jest.config.js b/packages/nx-plugin/jest.config.js index 3aca9da12c..a5cb252100 100644 --- a/packages/nx-plugin/jest.config.js +++ b/packages/nx-plugin/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'nx-plugin', }; diff --git a/packages/nx/jest.config.js b/packages/nx/jest.config.js index 5d0990534a..4ea1aba6fa 100644 --- a/packages/nx/jest.config.js +++ b/packages/nx/jest.config.js @@ -5,5 +5,5 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, }; diff --git a/packages/react/jest.config.js b/packages/react/jest.config.js index 6a1d703f67..dfb5cbf60a 100644 --- a/packages/react/jest.config.js +++ b/packages/react/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'react', }; diff --git a/packages/storybook/jest.config.js b/packages/storybook/jest.config.js index cfe6ffa402..32d3995468 100644 --- a/packages/storybook/jest.config.js +++ b/packages/storybook/jest.config.js @@ -5,7 +5,7 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], globals: { - 'ts-jest': { tsConfig: '/tsconfig.spec.json' }, + 'ts-jest': { tsconfig: '/tsconfig.spec.json' }, }, displayName: 'storybook', }; diff --git a/packages/tao/jest.config.js b/packages/tao/jest.config.js index 1031fc8c3a..9d43301627 100644 --- a/packages/tao/jest.config.js +++ b/packages/tao/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'tao', }; diff --git a/packages/web/jest.config.js b/packages/web/jest.config.js index d22cd6ab6c..92cdd5dd24 100644 --- a/packages/web/jest.config.js +++ b/packages/web/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'web', }; diff --git a/packages/workspace/jest.config.js b/packages/workspace/jest.config.js index c92eb4a378..1163772947 100644 --- a/packages/workspace/jest.config.js +++ b/packages/workspace/jest.config.js @@ -4,6 +4,6 @@ module.exports = { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], - globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } }, + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, displayName: 'workspace', }; diff --git a/packages/workspace/src/generators/library/library.spec.ts b/packages/workspace/src/generators/library/library.spec.ts index 5efd98ea1f..1a901f8360 100644 --- a/packages/workspace/src/generators/library/library.spec.ts +++ b/packages/workspace/src/generators/library/library.spec.ts @@ -117,7 +117,7 @@ describe('lib', () => { preset: '../../jest.preset.js', globals: { 'ts-jest': { - tsConfig: '/tsconfig.spec.json', + tsconfig: '/tsconfig.spec.json', } }, transform: { diff --git a/yarn.lock b/yarn.lock index 3c9c6f2292..45956540cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3696,14 +3696,6 @@ jest-diff "^25.2.1" pretty-format "^25.2.1" -"@types/jest@26.x": - version "26.0.20" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" - integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== - dependencies: - jest-diff "^26.0.0" - pretty-format "^26.0.0" - "@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" @@ -13248,7 +13240,7 @@ jest-diff@^25.2.1: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-diff@^26.0.0, jest-diff@^26.6.2: +jest-diff@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== @@ -14452,7 +14444,7 @@ lodash.map@^4.5.1: resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= -lodash.memoize@4.x, lodash.memoize@^4.1.2: +lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= @@ -21035,18 +21027,17 @@ ts-essentials@^2.0.3: resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745" integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w== -ts-jest@26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.0.tgz#903c7827f3d3bc33efc2f91be294b164400c32e3" - integrity sha512-ofBzoCqf6Nv/PoWb/ByV3VNKy2KJSikamOBxvR3E6eVdIw10GwAXoyvMWXXjZJK2s6S27ZE8fI+JBTnGaovl6Q== +ts-jest@26.5.5: + version "26.5.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.5.tgz#e40481b6ee4dd162626ba481a2be05fa57160ea5" + integrity sha1-5ASBtu5N0WJia6SBor4F+lcWDqU= dependencies: - "@types/jest" "26.x" bs-logger "0.x" buffer-from "1.x" fast-json-stable-stringify "2.x" jest-util "^26.1.0" json5 "2.x" - lodash.memoize "4.x" + lodash "4.x" make-error "1.x" mkdirp "1.x" semver "7.x"