generated from JS-DevTools/template-node-typescript
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add end-to-end test suite #80
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds a Verdaccio-based end-to-end test suite to CI, which spins up an NPM registry on
localhost
in the runner and tests that:These tests run through a lot of the code, which means we get pretty decent bang for our buck, and we can defer a lot of smaller behaviors to isolated unit tests. Most importantly, they only work if our registry auth logic is working, which is probably the most mission-critical logic in the module.
This PR should merge before anything else lands. I've added the E2E status check as a requirement for any PR merging into the main branch.
Background
The existing test suite of this action can't be used for actual regression protection, because it mocks out the
npm
binary, in the classical sense. Each test forms a set of expected calls tonpm
and return values for each of those calls. If any of those calls doesn't happen, or happens in a different manner than specified, the test fails.From a development standpoint, this has the following downsides:
npm
in the way we thinknpm
is supposed to be callednpm
!npm
, the tests will automatically fail, even if the changes are correctnpm
without also refactoring the testsChanges
./e2e