-
Notifications
You must be signed in to change notification settings - Fork 365
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
chore: introduce vitests for tests #5269
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
📊 Benchmark resultsPackage size: 247 MB
Legend
|
danez
changed the title
chore: introduce vitests for ESM unit tests
chore: introduce vitests for tests
Nov 28, 2022
danez
commented
Nov 30, 2022
DIST_IMPORT_MAP_PATH, | ||
INTERNAL_EDGE_FUNCTIONS_FOLDER, | ||
EDGE_FUNCTIONS_FOLDER, | ||
PUBLIC_URL_PATH, | ||
SERVER_POLL_INTERNAL, | ||
SERVER_POLL_TIMEOUT, |
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.
All unused
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.
I've added a few nitpick suggestions, all in all, this looks good.
jackiewmacharia
previously approved these changes
Nov 30, 2022
jackiewmacharia
previously approved these changes
Nov 30, 2022
Co-authored-by: Jackie Macharia <jackline.macharia@netlify.com>
khendrikse
approved these changes
Dec 5, 2022
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.
🎉 Thanks for submitting a pull request! 🎉
Summary
This introduces vitests for test files with mjs extension.
For integration tests the CI uses sharding again to split up tests into multiple workers, right now with one test this is kind of useless, but will be important later. In PRs the flag
--changed
is used to only run tests that have changes.vitest is clever enough to rerun all tests if package.json and shrinkwrap change. :)
The Jobs have also been renamed and are now called
Tests / E2E
Tests / Unit
Tests / Integration
Tests / Legacy Integration
(which will be going away)I was wondering what the
all
job is doing and found this: #4164 (comment)So it was meant to be the only job required from this workflow, which isn't the case right now as all test jobs are required. I opted to remove the all job for that reason, but happy to restore.
Ref #5265
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)