End-to-end tests for Verdaccio across all popular package managers and the web UI.
| Package | Description |
|---|---|
@verdaccio/e2e-cli |
CLI e2e tests (publish, install, audit, etc.) |
@verdaccio/e2e-ui |
Cypress UI e2e tests (home, signin, publish) |
pnpm install
pnpm build
# CLI tests — run against any Verdaccio
./scripts/run-e2e.sh 6 npm
# UI tests — run Cypress against any Verdaccio
./scripts/run-e2e-ui.sh 6
# Full matrix (all PMs x Verdaccio 5+6)
./scripts/run-e2e-matrix.shA standalone CLI tool that runs the full Verdaccio e2e test suite against any running registry. No test framework dependency — just plain assert.
verdaccio-e2e --registry http://localhost:4873
verdaccio-e2e -r http://localhost:4873 --pm npm --pm pnpm
verdaccio-e2e -r http://localhost:4873 --pm bun --pm deno
verdaccio-e2e -r http://localhost:4873 --test publish --test install
verdaccio-e2e -r http://localhost:4873 --pm yarn-modern=/path/to/yarn.js
verdaccio-e2e -r http://localhost:4873 -v # verbose — shows each command| Option | Description | Default |
|---|---|---|
-r, --registry <url> |
Verdaccio registry URL (required) | — |
--pm <name[=path]> |
Package manager to test (repeatable) | npm |
-t, --test <name> |
Filter tests by name (repeatable) | all supported |
--token <token> |
Auth token (skips user creation) | auto-created |
--timeout <ms> |
Per-test timeout | 50000 |
-v, --verbose |
Show each command executed | false |
| Adapter | --pm value |
Notes |
|---|---|---|
| npm | npm |
Uses --registry flag |
| pnpm | pnpm |
Uses --registry flag |
| Yarn Classic (v1) | yarn-classic |
Requires Yarn 1.x in PATH |
| Yarn Modern (v2+) | yarn-modern=/path/to/yarn.js |
Uses .yarnrc.yml for registry config |
| Bun | bun |
Uses --registry flag (except info which reads .npmrc) |
| Deno | deno |
Reads registry from .npmrc, install and info only |
| Test | npm | pnpm ≤10 | pnpm ≥11 | yarn-classic | yarn-modern | bun | deno |
|---|---|---|---|---|---|---|---|
| publish | yes | yes | yes | yes | yes | yes | skip |
| install | yes | yes | yes | yes | yes | yes | yes |
| ci | yes | yes | yes | yes | yes | yes | skip |
| info | yes | yes | yes | yes | yes | yes | yes |
| audit | yes | yes | yes | yes | skip | yes | skip |
| deprecate | yes | yes | yes | skip | yes | skip | skip |
| dist-tags | yes | yes | skip | skip | skip | skip | skip |
| login | skip | skip | skip | skip | yes | skip | skip |
| ping | yes | yes | skip | skip | yes | skip | skip |
| search | yes | yes | skip | skip | skip | skip | skip |
| star | yes | yes | skip | skip | skip | skip | skip |
| unpublish | yes | yes | yes | skip | skip | skip | skip |
pnpm ≥11 notes: pnpm v11 reimplemented many commands natively and removed
ping,search,star, anddist-tag. Un-deprecate uses the newpnpm undeprecatecommand (other package managers usedeprecate pkg ""with an empty message).Bun notes:
bun inforeads the registry from.npmrc(does not accept--registry). All other commands use--registry.Deno notes: Deno reads the registry entirely from
.npmrc. Onlyinstallandinfoare supported.deno infousesnpm:<pkg>specifiers with--node-modules-dir=auto.
Scenarios are complex, multi-step tests that simulate real-world workflows beyond single-command operations. They exercise the registry under realistic conditions — many parallel requests, transitive dependency resolution, version updates, etc.
| Scenario | Description | Requires |
|---|---|---|
scenario:install-multiple-deps |
Publishes a tree of packages (leaf, shared, intermediate with transitive deps), installs them all in a consumer project, verifies metadata, then publishes updated versions and re-installs with semver ranges | publish, install, info |
Run a specific scenario:
verdaccio-e2e -r http://localhost:4873 -t scenario:install-multiple-depsSimulates a realistic npm install that triggers many parallel registry requests. The test has four phases:
- Publish seed packages — publishes 5 leaf packages, a shared package, and an intermediate package that depends on some leaves + shared (8 packages total)
- Install all dependencies — creates a consumer project that depends on all packages (including transitive overlap via the intermediate), runs
install - Verify installed packages — asserts every package is in the registry with correct name, version, and dependency metadata
- Update and re-install — publishes v2.0.0 of selected packages, creates a new consumer using
^ranges, installs, and verifiesdist-tags.latestreflects the update
See docs/cli-tests.md for detailed descriptions of what each test asserts.
import { createNpmAdapter, createPnpmAdapter, createBunAdapter, createDenoAdapter, allTests, runAll } from '@verdaccio/e2e-cli';
const adapters = [createNpmAdapter(), createPnpmAdapter(), createBunAdapter(), createDenoAdapter()];
const { results, exitCode } = await runAll(adapters, allTests, 'http://localhost:4873', token, {
timeout: 50000,
concurrency: 1,
});Run only scenarios:
import { createNpmAdapter, allScenarios, runAll } from '@verdaccio/e2e-cli';
const { results, exitCode } = await runAll([createNpmAdapter()], allScenarios, 'http://localhost:4873', token, {
timeout: 120000,
concurrency: 1,
});A Cypress plugin that provides reusable Verdaccio UI test suites. Run the same tests against any Verdaccio version without copying test files.
npm install @verdaccio/e2e-ui cypresscypress.config.ts
import { defineConfig } from 'cypress';
import { setupVerdaccioTasks } from '@verdaccio/e2e-ui';
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:4873',
setupNodeEvents(on) {
setupVerdaccioTasks(on, { registryUrl: 'http://localhost:4873' });
},
},
});cypress/support/e2e.ts
import '@verdaccio/e2e-ui/commands';cypress/e2e/verdaccio.cy.ts
import { createRegistryConfig, registerAllTests } from '@verdaccio/e2e-ui';
const config = createRegistryConfig({ registryUrl: 'http://localhost:4873' });
registerAllTests(config);Or pick individual suites:
import { createRegistryConfig, homeTests, signinTests } from '@verdaccio/e2e-ui';
const config = createRegistryConfig({
registryUrl: 'http://localhost:4873',
title: 'My Verdaccio', // optional, default: 'Verdaccio'
credentials: { user: 'admin', password: 'admin' }, // optional
});
homeTests(config);
signinTests(config);| Suite | Tests |
|---|---|
homeTests |
Page title, help card (empty registry), 404 page |
signinTests |
Login, logout |
publishTests |
Publish package, navigate detail, readme, dependencies, versions, uplinks |
Importing @verdaccio/e2e-ui/commands adds:
| Command | Description |
|---|---|
cy.getByTestId(id) |
Find element by data-testid attribute |
cy.login(user, password) |
Login to Verdaccio UI |
| Export | Description |
|---|---|
setupVerdaccioTasks(on, options) |
Register Cypress tasks |
createRegistryConfig(options) |
Build config with defaults |
registerAllTests(config) |
Register all test suites |
homeTests(config) |
Home page tests |
signinTests(config) |
Login/logout tests |
publishTests(config) |
Package publish + detail tests |
| Script | Description |
|---|---|
./scripts/run-e2e.sh [version] [pm] |
Run CLI tests against a Verdaccio version |
./scripts/run-e2e-ui.sh [version] |
Run Cypress UI tests against a Verdaccio version |
./scripts/run-e2e-matrix.sh |
Run CLI tests for all detected PMs x Verdaccio 5+6+next-7 |
All scripts accept --docker to use Docker images instead of local npm install.
./scripts/run-e2e.sh 6 npm # CLI: verdaccio@6, npm
./scripts/run-e2e.sh 5 pnpm # CLI: verdaccio@5, pnpm
./scripts/run-e2e.sh next-7 npm # CLI: verdaccio@next-7, npm
./scripts/run-e2e.sh --docker 6 npm # CLI: Docker verdaccio@6
./scripts/run-e2e-ui.sh 6 # UI: verdaccio@6
./scripts/run-e2e-ui.sh --docker 6 # UI: Docker verdaccio@6
./scripts/run-e2e-ui.sh --open # UI: interactive Cypress
./scripts/run-e2e-matrix.sh # Full CLI matrix
./scripts/run-e2e-matrix.sh --docker # Full CLI matrix via DockerAll packages built with Vite 8 in library mode. Pure ESM, no Babel.
pnpm build # build all tools
pnpm clean # clean build output