mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-13 03:35:52 +01:00
459b6fa72b
* Refactor local-storage async refactor local storage search stream Remove async from local-storage, refactor search with streams refactor search with undici fetch finish search refactor stream multiple request to single stream refactor storage types remove async dependency #1225 add score and refactor metadata remove old search async fix missing stream local data clean up clean up refactor folder search format fix some test fix issue on publish filter preview update ci delete package folder refactor refactor get packages methods fix tests fix lock file add changeset fix test windows disable some test update package json versions * fix merge * fix e2e cli * restore e2e * Update process.ts * Update process.ts * add improvement * format * Update utils.ts * test * test * Update search.spec.ts * Update search.spec.ts * Update search.spec.ts * test * Update ci.yml * clean up * fix tests * Update tags.ts * Update index.spec.ts * document changeset * format |
||
---|---|---|
.. | ||
config | ||
projects | ||
setup | ||
test_bk | ||
utils | ||
.babelrc | ||
.eslintrc | ||
CHANGELOG.md | ||
env_babel.js | ||
env_setup.js | ||
env_teardown.js | ||
jest.config.e2e.cli.js | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.json |
E2E CLI Testing
What is included on these test?
- Default configuration only
- Basic commands eg (
install / add
,info
,publish
). - Test with 3 package managers (
yarn classic
,pnpm
andnpm@7
)
How it works?
On run test suites, there is a global setup where will install the local source code of verdaccio in a temporary folder. Each suite will install.
spawn
a registry on port6001
using_bootstrap_verdaccio.yaml
which block any local package being fetched from remote upstream.- Publish local project to the spawned registry (with global
pnpm
)
The published
verdaccio
should be fetch by each suite to ensure reliability of each test.
How to write test?
Each of the suite must use a package manager command (eg: npm install
) and validate the output according what the
user see, either verifying the outcome in JSON form, run a command (eg: jest ..
) and the expected result.
Each Test should start with the initial setup, this step does the following
beforeAll
: Install verdaccio to the suite context that returns aSetup
object.afterAll
: Stop the child process that runs verdaccio.
beforeAll(async () => {
setup = await initialSetup(tempRootFolder, port);
console.log('--setup', setup.install);
});
stop the process is the final step that should occur in every suite.
afterAll(async () => {
setup.child.kill();
});
What should not included on these tests?
- Anything is unrelated with client commands usage, eg: (auth permissions, third party integrations, hooks, plugins)