From 88bf84cbd8d7715a9d45f4cc76842f58d3dfa66e Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 22 Nov 2024 15:22:42 +0100 Subject: [PATCH] test: cleanup deps --- e2e/create-cli-e2e/project.json | 9 +------- e2e/create-cli-e2e/tests/init.e2e.test.ts | 28 ++++------------------- testing/test-nx-utils/project.json | 2 +- 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/e2e/create-cli-e2e/project.json b/e2e/create-cli-e2e/project.json index c216582b8..ecb0d138f 100644 --- a/e2e/create-cli-e2e/project.json +++ b/e2e/create-cli-e2e/project.json @@ -18,13 +18,6 @@ } } }, - "implicitDependencies": [ - "models", - "utils", - "core", - "cli", - "nx-plugin", - "create-cli" - ], + "implicitDependencies": ["create-cli"], "tags": ["scope:tooling", "type:e2e"] } diff --git a/e2e/create-cli-e2e/tests/init.e2e.test.ts b/e2e/create-cli-e2e/tests/init.e2e.test.ts index ba6d08ff8..8f1deb07a 100644 --- a/e2e/create-cli-e2e/tests/init.e2e.test.ts +++ b/e2e/create-cli-e2e/tests/init.e2e.test.ts @@ -20,16 +20,10 @@ describe('create-cli-inti', () => { it('should execute package correctly over npm exec', async () => { const cwd = join(testFileDir, 'npm-exec'); - const userconfig = relative(cwd, join(workspaceRoot, '.npmrc')); await createNpmWorkspace(cwd); const { code, stdout } = await executeProcess({ command: 'npm', - args: [ - 'exec', - '@code-pushup/create-cli', - `--userconfig=${userconfig}`, - `--prefix=${dirname(userconfig)}`, - ], + args: ['exec', '@code-pushup/create-cli'], cwd, }); @@ -60,18 +54,11 @@ describe('create-cli-inti', () => { it('should execute package correctly over npm init', async () => { const cwd = join(testFileDir, 'npm-init'); - const userconfig = relative(cwd, join(workspaceRoot, '.npmrc')); - await createNpmWorkspace(cwd); const { code, stdout } = await executeProcess({ command: 'npm', - args: [ - 'init', - '@code-pushup/cli', - `--userconfig=${userconfig}`, - `--prefix=${dirname(userconfig)}`, - ], + args: ['init', '@code-pushup/cli'], cwd, }); @@ -102,25 +89,18 @@ describe('create-cli-inti', () => { it('should produce an executable setup when running npm init', async () => { const cwd = join(testFileDir, 'npm-init-executable'); - const userconfig = relative(cwd, join(workspaceRoot, '.npmrc')); - await createNpmWorkspace(cwd); await executeProcess({ command: 'npm', - args: [ - 'init', - '@code-pushup/cli', - `--userconfig=${userconfig}`, - `--prefix=${dirname(userconfig)}`, - ], + args: ['init', '@code-pushup/cli'], cwd, }); await expect( executeProcess({ command: 'npx', - args: ['@code-pushup/cli print-config', `--userconfig=${userconfig}`], + args: ['@code-pushup/cli print-config'], cwd, }), ) diff --git a/testing/test-nx-utils/project.json b/testing/test-nx-utils/project.json index 5e60491be..72d84d1c7 100644 --- a/testing/test-nx-utils/project.json +++ b/testing/test-nx-utils/project.json @@ -29,5 +29,5 @@ } } }, - "tags": ["scope:tooling", "type:testing"] + "tags": ["scope:shared", "type:testing"] }