https://github.com/verdaccio/e2e-tests
run e2e tests for 6.x and 7.x branches
https://github.com/verdaccio/e2e-tests
e2e-tests verdaccio
Last synced: 6 months ago
JSON representation
run e2e tests for 6.x and 7.x branches
- Host: GitHub
- URL: https://github.com/verdaccio/e2e-tests
- Owner: verdaccio
- Created: 2022-11-06T17:31:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-04T06:35:05.000Z (6 months ago)
- Last Synced: 2025-04-11T14:41:29.342Z (6 months ago)
- Topics: e2e-tests, verdaccio
- Language: TypeScript
- Homepage:
- Size: 3.16 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# E2E CLI Testing for `main=7.x` Branch
> For 6.x versions, check `6.x` branch
> For 7.x versions, check `main` branch[More info about versions](https://github.com/verdaccio/verdaccio/blob/master/VERSIONS.md)
What is included on these test?
## With Cypress
- Test the UI fo latest master branch docker image
## With docker (docker compose)
> It uses the image `verdaccio/verdaccio:nightly-master`, latest `6.x` branch changes
- nginx proxy
- apache proxy
- using pluginsAll docker test are run with GitHub Actions
## With npm cli
> It uses the latest `npmjs` version published
- Default configuration only
- Test with all popular package managers### What commands and versions are tested?
See all details [here](https://github.com/verdaccio/verdaccio?tab=readme-ov-file#commands)
## How it works?
Every package manager + version is a package in the monorepo.
The package `@verdaccio/test-cli-commons` contains helpers used for each package manager.
```ts
import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons';
```The registry can be executed with the following commands, the port is automatically assigned.
```ts
// setup
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
// teardown
registry.stop();
```The full url can be get from `registry.getRegistryUrl()`. The yarn modern does not allows the `--registry` so need a more complex step, while others is just enough adding the following to every command.
```ts
await yarn({ cwd: tempFolder }, 'install', ...addRegistry(registry.getRegistryUrl()));
```The most of the command allow return output in JSON format which helps with the expects.
```ts
const resp = await yarn(
{ cwd: tempFolder },
'audit',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.type).toEqual('auditSummary');
```Every command should test either console output or in special cases look up the storage manually.
### What should not included on these tests?
- Anything is unrelated with client commands usage, eg: (auth permissions, third party integrations,
hooks, plugins)