Skip to content

Commit

Permalink
test(cli-e2e): ensure old e2e setup installs packages from local regi…
Browse files Browse the repository at this point in the history
…stry
  • Loading branch information
matejchalk committed Oct 16, 2024
1 parent b39f544 commit 4e0c034
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
22 changes: 13 additions & 9 deletions e2e/cli-e2e/tests/__snapshots__/help.e2e.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,21 @@ Commands:
Global Options:
--progress Show progress bar in stdout.
--progress Show progress bar in stdout.
[boolean] [default: true]
--verbose When true creates more verbose output. This is helpful when
debugging. [boolean] [default: false]
--config Path to config file. By default it loads code-pushup.config
.(ts|mjs|js). [string]
--tsconfig Path to a TypeScript config, to be used when loading config
file. [string]
-p, --onlyPlugins List of plugins to run. If not set all plugins are run.
--verbose When true creates more verbose output. This is helpful w
hen debugging. [boolean] [default: false]
--config Path to config file. By default it loads code-pushup.con
fig.(ts|mjs|js). [string]
--tsconfig Path to a TypeScript config, to be used when loading con
fig file. [string]
--skipCategories List of categories to skip. If not set all categories ar
e run. [array] [default: []]
--onlyCategories List of categories to run. If not set all categories are
run. [array] [default: []]
-P, --skipPlugins List of plugins to skip. If not set all plugins are run.
[array] [default: []]
-P, --skipPlugins List of plugins to skip. If not set all plugins are run.
-p, --onlyPlugins List of plugins to run. If not set all plugins are run.
[array] [default: []]
Persist Options:
Expand Down
3 changes: 3 additions & 0 deletions global-setup.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { rm, writeFile } from 'node:fs/promises';
import { join } from 'node:path';
import { setup as globalSetup } from './global-setup';
import { setupTestFolder, teardownTestFolder } from './testing/test-setup/src';
Expand Down Expand Up @@ -35,6 +36,7 @@ export async function setup() {

// package publish
const { registry } = activeRegistry.registryData;
await writeFile('.npmrc', `@code-pushup:registry=${registry}`);
try {
console.info('Publish packages');
nxRunManyPublish({
Expand Down Expand Up @@ -64,5 +66,6 @@ export async function teardown() {
stopLocalRegistry(stop);
nxRunManyNpmUninstall({ parallel: 1 });
}
await rm('.npmrc');
await teardownTestFolder(e2eDir);
}

0 comments on commit 4e0c034

Please sign in to comment.