-
Notifications
You must be signed in to change notification settings - Fork 387
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
test(e2e): isolate E2E tests and remove destructive actions #7132
Merged
+291
−307
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
dfd17db
to
51871e5
Compare
51871e5
to
d7c1547
Compare
c57cccb
to
1df5817
Compare
serhalp
approved these changes
Mar 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for improving it! 💯
ndhoule
commented
Mar 26, 2025
1c3f054
to
038d440
Compare
The E2E suite has a litany of problems, including that it is fairly complex, doesn't work very well locally and destructively modifies the workspace, and doesn't isolate tests from each other particularly well. The tests rely on wrapper scripts to work properly, which makes it unnecessarily difficult to run E2E tests. This changeset makes a few changes to the E2E test to help address these issues The tl;dr is that tests are now self contained without any need for wrapper scripts and are better isolated. Other notable changes include: - Each test now gets its own isolated Verdaccio registry; the Verdaccio registry storage is no longer shared between tests and is no longer persisted between test invocations. - The CLI is now published to the (isolated) Verdaccio registry from a temporary workspace, which is a copy of the project workspace. We no longer publish to Verdaccio from the project workspace. This ensures that destructive actions that occur on publish don't alter the workspace, and ensures that one test can't modify the registry in a way that impacts another test. - The tests no longer rely on wrapper scripts (which ran `vitest` in a subprocess and didn't always work locally (depending on your `PATH`). - I also converted the tests to TypeScript while I was at it. Theoretically, these changes mean we can run E2E tests concurrently, though I haven't done that in this changeset. We could also now merge the E2E vitest configuration into the primary Vitest config (though I haven't done that here, either).
038d440
to
82f3522
Compare
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.
The E2E suite has a litany of problems, including that it is fairly
complex, doesn't work very well locally and destructively modifies the
workspace, and doesn't isolate tests from each other particularly well.
The tests rely on wrapper scripts to work properly, which makes it
unnecessarily difficult to run E2E tests.
This changeset makes a few changes to the E2E test to help address these
issues The tl;dr is that tests are now self contained without any need
for wrapper scripts and are better isolated. Other notable changes
include:
registry storage is no longer shared between tests and is no longer
persisted between test invocations.
temporary workspace, which is a copy of the project workspace. We no
longer publish to Verdaccio from the project workspace. This ensures
that destructive actions that occur on publish don't alter the
workspace, and ensures that one test can't modify the registry in a
way that impacts another test.
vitest
in asubprocess and didn't always work locally (depending on your
PATH
).Theoretically, these changes mean we can run E2E tests concurrently,
though I haven't done that in this changeset. We could also now merge
the E2E vitest configuration into the primary Vitest config (though I
haven't done that here, either).