diff --git a/e2e/plugin/src/nx-plugin.test.ts b/e2e/plugin/src/nx-plugin.test.ts index 01e09e67d0a46..d1b2f0eefdd48 100644 --- a/e2e/plugin/src/nx-plugin.test.ts +++ b/e2e/plugin/src/nx-plugin.test.ts @@ -60,7 +60,7 @@ describe('Nx Plugin', () => { runCLI(`generate @nx/plugin:plugin ${plugin} --linter=eslint`); runCLI( - `generate @nx/plugin:migration --path=${plugin}/src/migrations/update-${version} --packageVersion=${version} --packageJsonUpdates=false` + `generate @nx/plugin:migration --path=${plugin}/src/migrations/update-${version}/update-${version} --packageVersion=${version} --packageJsonUpdates=false` ); const lintResults = runCLI(`lint ${plugin}`); @@ -92,7 +92,7 @@ describe('Nx Plugin', () => { runCLI(`generate @nx/plugin:plugin ${plugin} --linter=eslint`); runCLI( - `generate @nx/plugin:generator ${plugin}/src/generators/${generator} --name ${generator}` + `generate @nx/plugin:generator ${plugin}/src/generators/${generator}/generator --name ${generator}` ); const lintResults = runCLI(`lint ${plugin}`); @@ -129,7 +129,7 @@ describe('Nx Plugin', () => { runCLI(`generate @nx/plugin:plugin ${plugin} --linter=eslint`); runCLI( - `generate @nx/plugin:executor --name ${executor} --path=${plugin}/src/executors/${executor} --includeHasher` + `generate @nx/plugin:executor --name ${executor} --path=${plugin}/src/executors/${executor}/executor --includeHasher` ); const lintResults = runCLI(`lint ${plugin}`); @@ -178,19 +178,19 @@ describe('Nx Plugin', () => { runCLI(`generate @nx/plugin:plugin ${plugin} --linter=eslint`); runCLI( - `generate @nx/plugin:generator --name=${goodGenerator} --path=${plugin}/src/generators/${goodGenerator}` + `generate @nx/plugin:generator --name=${goodGenerator} --path=${plugin}/src/generators/${goodGenerator}/generator` ); runCLI( - `generate @nx/plugin:generator --name=${badFactoryPath} --path=${plugin}/src/generators/${badFactoryPath}` + `generate @nx/plugin:generator --name=${badFactoryPath} --path=${plugin}/src/generators/${badFactoryPath}/generator` ); runCLI( - `generate @nx/plugin:executor --name=${goodExecutor} --path=${plugin}/src/executors/${goodExecutor}` + `generate @nx/plugin:executor --name=${goodExecutor} --path=${plugin}/src/executors/${goodExecutor}/executor` ); runCLI( - `generate @nx/plugin:executor --name=${badExecutorBadImplPath} --path=${plugin}/src/executors/${badExecutorBadImplPath}` + `generate @nx/plugin:executor --name=${badExecutorBadImplPath} --path=${plugin}/src/executors/${badExecutorBadImplPath}/executor` ); runCLI( @@ -308,11 +308,11 @@ describe('Nx Plugin', () => { const generatedProject = uniq('project'); runCLI( - `generate @nx/plugin:generator --name ${generator} --path ${plugin}/src/generators/${generator}` + `generate @nx/plugin:generator --name ${generator} --path ${plugin}/src/generators/${generator}/generator` ); runCLI( - `generate @nx/plugin:executor --name ${executor} --path ${plugin}/src/executors/${executor}` + `generate @nx/plugin:executor --name ${executor} --path ${plugin}/src/executors/${executor}/executor` ); updateFile( @@ -349,7 +349,7 @@ describe('Nx Plugin', () => { expect(() => { runCLI( - `generate @nx/plugin:generator ${plugin}/src/generators/${generator} --name ${generator}` + `generate @nx/plugin:generator ${plugin}/src/generators/${generator}/generator --name ${generator}` ); runCLI( diff --git a/packages/plugin/src/generators/executor/files/executor/__fileName__.spec.ts.template b/packages/plugin/src/generators/executor/files/executor/__fileName__.spec.ts.template index 3e44f6c74b8e9..c540569e00709 100644 --- a/packages/plugin/src/generators/executor/files/executor/__fileName__.spec.ts.template +++ b/packages/plugin/src/generators/executor/files/executor/__fileName__.spec.ts.template @@ -1,7 +1,7 @@ import { ExecutorContext } from '@nx/devkit'; import { <%= className %>ExecutorSchema } from './schema'; -import executor from './executor'; +import executor from './<%= fileName %>'; const options: <%= className %>ExecutorSchema = {}; const context: ExecutorContext = { diff --git a/packages/plugin/src/generators/generator/files/generator/__fileName__.spec.ts.template b/packages/plugin/src/generators/generator/files/generator/__fileName__.spec.ts.template index d4b8c36a7f6ca..f8f55ddefcf9b 100644 --- a/packages/plugin/src/generators/generator/files/generator/__fileName__.spec.ts.template +++ b/packages/plugin/src/generators/generator/files/generator/__fileName__.spec.ts.template @@ -1,7 +1,7 @@ import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { Tree, readProjectConfiguration } from '@nx/devkit'; -import { <%= generatorFnName %> } from './generator'; +import { <%= generatorFnName %> } from './<%= fileName %>'; import { <%= schemaInterfaceName %> } from './schema'; describe('<%= name %> generator', () => {