diff --git a/packages/devkit/src/executors/parse-target-string.spec.ts b/packages/devkit/src/executors/parse-target-string.spec.ts index 3ce6fd0b48182..c5d586a80cecf 100644 --- a/packages/devkit/src/executors/parse-target-string.spec.ts +++ b/packages/devkit/src/executors/parse-target-string.spec.ts @@ -38,6 +38,15 @@ describe('parseTargetString', () => { externalNodes: {}, version: '', }, + workspace: { + version: 2, + projects: {}, + }, + projectsConfigurations: { + version: 2, + projects: {}, + }, + nxJsonConfiguration: {}, }; it.each(cases)('$input -> $expected', ({ input, expected }) => { diff --git a/packages/esbuild/src/executors/esbuild/lib/build-esbuild-options.spec.ts b/packages/esbuild/src/executors/esbuild/lib/build-esbuild-options.spec.ts index ab228170604d0..42180f7dab6f5 100644 --- a/packages/esbuild/src/executors/esbuild/lib/build-esbuild-options.spec.ts +++ b/packages/esbuild/src/executors/esbuild/lib/build-esbuild-options.spec.ts @@ -3,16 +3,17 @@ import { ExecutorContext } from 'nx/src/config/misc-interfaces'; import path = require('path'); describe('buildEsbuildOptions', () => { - const context: ExecutorContext = { - projectName: 'myapp', - projectsConfigurations: { - version: 2, - projects: { - myapp: { - root: 'apps/myapp', - }, + const projectsConfigurations = { + version: 2, + projects: { + myapp: { + root: 'apps/myapp', }, }, + }; + const context: ExecutorContext = { + projectName: 'myapp', + projectsConfigurations, projectGraph: { nodes: { myapp: { @@ -33,6 +34,7 @@ describe('buildEsbuildOptions', () => { outputPath: 'dist/apps/myapp', }, }, + workspace: projectsConfigurations, }; it('should include environment variables for platform === browser', () => { diff --git a/packages/esbuild/src/executors/esbuild/lib/normalize.spec.ts b/packages/esbuild/src/executors/esbuild/lib/normalize.spec.ts index 4e9ebb014af20..77044cd694ed2 100644 --- a/packages/esbuild/src/executors/esbuild/lib/normalize.spec.ts +++ b/packages/esbuild/src/executors/esbuild/lib/normalize.spec.ts @@ -19,6 +19,15 @@ describe('normalizeOptions', () => { }, dependencies: {}, }, + workspace: { + version: 2, + projects: {}, + }, + projectsConfigurations: { + version: 2, + projects: {}, + }, + nxJsonConfiguration: {}, }; it('should handle single entry point options', () => { diff --git a/packages/eslint/src/executors/lint/lint.impl.spec.ts b/packages/eslint/src/executors/lint/lint.impl.spec.ts index 96a2cef593597..09644298d0089 100644 --- a/packages/eslint/src/executors/lint/lint.impl.spec.ts +++ b/packages/eslint/src/executors/lint/lint.impl.spec.ts @@ -104,6 +104,14 @@ describe('Linter Builder', () => { }, }, nxJsonConfiguration: {}, + workspace: { + version: 2, + projects: {}, + }, + projectGraph: { + nodes: {}, + dependencies: {}, + }, isVerbose: false, }; mockLintFiles.mockImplementation(() => mockReports); diff --git a/packages/jest/src/executors/jest/jest.impl.spec.ts b/packages/jest/src/executors/jest/jest.impl.spec.ts index 2672894685342..e8a9264e5f053 100644 --- a/packages/jest/src/executors/jest/jest.impl.spec.ts +++ b/packages/jest/src/executors/jest/jest.impl.spec.ts @@ -56,6 +56,14 @@ describe('Jest Executor', () => { }, cwd: '/root', isVerbose: true, + workspace: { + version: 2, + projects: {}, + }, + projectGraph: { + nodes: {}, + dependencies: {}, + }, }; }); diff --git a/packages/js/src/utils/package-json/update-package-json.spec.ts b/packages/js/src/utils/package-json/update-package-json.spec.ts index 0ee856a8817f7..ac5e09c2fdf93 100644 --- a/packages/js/src/utils/package-json/update-package-json.spec.ts +++ b/packages/js/src/utils/package-json/update-package-json.spec.ts @@ -419,6 +419,15 @@ describe('updatePackageJson', () => { cwd: '', targetName: 'build', projectGraph, + nxJsonConfiguration: {}, + projectsConfigurations: { + version: 2, + projects: {}, + }, + workspace: { + version: 2, + projects: {}, + }, }; it('should generate new package if missing', () => { diff --git a/packages/rollup/src/executors/rollup/rollup.impl.spec.ts b/packages/rollup/src/executors/rollup/rollup.impl.spec.ts index aaa69f167b2c2..ac0446b8669a6 100644 --- a/packages/rollup/src/executors/rollup/rollup.impl.spec.ts +++ b/packages/rollup/src/executors/rollup/rollup.impl.spec.ts @@ -22,6 +22,14 @@ describe('rollupExecutor', () => { isVerbose: false, projectName: 'example', targetName: 'build', + projectGraph: { + nodes: {}, + dependencies: {}, + }, + workspace: { + version: 2, + projects: {}, + }, }; testOptions = { compiler: 'babel',