-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat(test): moving unit tests over to vitest #857
Merged
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
erunion
changed the title
feat(test): moving unit tests over to vitest + prettier 3
feat(test): moving unit tests over to vitest + prettier 3 + drop node 14
Aug 10, 2023
erunion
changed the title
feat(test): moving unit tests over to vitest + prettier 3 + drop node 14
feat(test): moving unit tests over to vitest + prettier 3
Aug 10, 2023
erunion
commented
Aug 10, 2023
12 tasks
if you return a function within before* hooks, they'll run on teardown. so these functions are currently doing the opposite of what we're intending 😮💨 see: https://vitest.dev/api/#beforeall
This was referenced Sep 5, 2023
Open
* test: try splitting out tests * ci: knip fix * ci: oops * chore: remove unused snapshots * refactor: try using MSW instead of nock in single-threaded tests * chore: temporarily don't worry about coverage 🤐 * chore: backfill headers-polyfill * ci: re-enable tests on node 14 * test: add JSON error body * ci: try matrix for threads * ci: oops * chore: copy edits * chore: run build before tests * fix(ci): split out ci and test steps * chore: fix lockfile * Revert "fix(ci): split out ci and test steps" This reverts commit 112ec66. * chore: clean out some comment junk * chore: try fixing lockfile (again) @esbuild/android-arm wasn't showing up in here, i think it got accidentally removed which is causing node 14 tests to break * feat: better header checking
kanadgupta
changed the title
feat(test): moving unit tests over to vitest + prettier 3
feat(test): moving unit tests over to vitest
Sep 5, 2023
kanadgupta
approved these changes
Sep 5, 2023
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.
@erunion this is your PR but most of the recent work has been mine, mind taking one final glance before I merge?
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.
🧰 Changes
Upgrading us to Prettier 3.(Kanad update 9/5): pulled into a separate PR, see chore(prettier): upgrading to prettier 3 #864Stop testing Node 14 as Prettier 3 doesn't run on it.(Kanad update 9/5): got it working by splitting out the linting into a separate CI step, see chore(prettier): upgrading to prettier 3 #864🧬 QA & Testing
If tests pass we should be good to go! Sadly in splitting out the tests and requiring certain tests to be single-threaded, the performance benefits are mostly a wash.
🐳 Outdated Performance Benchmarks
Before
After
I'm seeing some flakiness in a couple tests but running the entire a bit slower than Jest because we can't use
--threads
due to our usage ofprocess.chdir()
. See #857 (comment) below for some more deets.