From ec43936c46052a16f002944652731d8aa1cf1980 Mon Sep 17 00:00:00 2001 From: Bram Borggreve Date: Wed, 25 Oct 2023 20:09:03 -0500 Subject: [PATCH] fix(nx-plugin): move tests from 'tests' to 'src' directory --- packages/plugin/src/generators/e2e-project/e2e.spec.ts | 2 +- packages/plugin/src/generators/e2e-project/e2e.ts | 2 +- .../files/{tests => src}/__pluginName__.spec.ts__tmpl__ | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename packages/plugin/src/generators/e2e-project/files/{tests => src}/__pluginName__.spec.ts__tmpl__ (100%) diff --git a/packages/plugin/src/generators/e2e-project/e2e.spec.ts b/packages/plugin/src/generators/e2e-project/e2e.spec.ts index 6e8e0a1ec366c..d53e71afab712 100644 --- a/packages/plugin/src/generators/e2e-project/e2e.spec.ts +++ b/packages/plugin/src/generators/e2e-project/e2e.spec.ts @@ -51,7 +51,7 @@ describe('NxPlugin e2e-project Generator', () => { expect(tree.exists('apps/my-plugin-e2e/tsconfig.json')).toBeTruthy(); expect( - tree.exists('apps/my-plugin-e2e/tests/my-plugin.spec.ts') + tree.exists('apps/my-plugin-e2e/src/my-plugin.spec.ts') ).toBeTruthy(); }); diff --git a/packages/plugin/src/generators/e2e-project/e2e.ts b/packages/plugin/src/generators/e2e-project/e2e.ts index b4a50e7809527..95340fe1f15a4 100644 --- a/packages/plugin/src/generators/e2e-project/e2e.ts +++ b/packages/plugin/src/generators/e2e-project/e2e.ts @@ -109,7 +109,7 @@ async function addJest(host: Tree, options: NormalizedSchema) { addProjectConfiguration(host, options.projectName, { root: options.projectRoot, projectType: 'application', - sourceRoot: `${options.projectRoot}/tests`, + sourceRoot: `${options.projectRoot}/src`, targets: {}, implicitDependencies: [options.pluginName], }); diff --git a/packages/plugin/src/generators/e2e-project/files/tests/__pluginName__.spec.ts__tmpl__ b/packages/plugin/src/generators/e2e-project/files/src/__pluginName__.spec.ts__tmpl__ similarity index 100% rename from packages/plugin/src/generators/e2e-project/files/tests/__pluginName__.spec.ts__tmpl__ rename to packages/plugin/src/generators/e2e-project/files/src/__pluginName__.spec.ts__tmpl__