Test running overhaul, switch to Prettier & reformat everything#1407
Merged
raklaptudirm merged 12 commits intoTheAlgorithms:masterfrom Oct 3, 2023
defaude:chore/switch-to-vitest
Merged
Test running overhaul, switch to Prettier & reformat everything#1407raklaptudirm merged 12 commits intoTheAlgorithms:masterfrom defaude:chore/switch-to-vitest
raklaptudirm merged 12 commits intoTheAlgorithms:masterfrom
defaude:chore/switch-to-vitest
Conversation
Seems the switch to Node 20 and Vitest has vastly improved the code's and / or the test's runtime! see #1193
appgurueu
reviewed
Oct 2, 2023
appgurueu
reviewed
Oct 2, 2023
appgurueu
reviewed
Oct 2, 2023
appgurueu
previously approved these changes
Oct 2, 2023
Collaborator
appgurueu
left a comment
There was a problem hiding this comment.
Looks good to me, though I'd prefer keeping line endings at LF in the prettier config unless there is a good reason against it. I also wonder how our CI apparently passed with failing tests (but analyzing or fixing that can be done later, it doesn't have to be in this PR).
Note to self & Rak: Look at the commits individually to not get caught up in the large formatting diff, don't squash.
appgurueu
previously approved these changes
Oct 2, 2023
raklaptudirm
reviewed
Oct 3, 2023
appgurueu
approved these changes
Oct 3, 2023
11 tasks
raklaptudirm
approved these changes
Oct 3, 2023
This file contains hidden or 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.
This PR overhauls the test setup as well as the pipeline
Fixes #1378
Node 20 is now the default minimum engine
This doesn't mean stuff will break if people are using older versions of Node, but they will get a warning during
npm install. Vitest should be fine with Node >= 14.18, actually. Nevertheless, it's a reasonable thing to assume everyone has at least the current "active LTS" version of Node available.Replacing Jest + Babel with Vitest
We already switched to ESM a while ago. There is no need to pump everything through Babel into Jest. Vitest is a blazing-fast drop-in replacement that is mostly Jest-compatible (and definitely better compatible with Jest than Bun is...). This change allows us to drop a ton of npm dependencies.
Remove standard in favor of prettier
There was a .prettierrc file in the repo already, but for some reason we were stuck with standard. I took the liberty to clean up here, as well. It's now prettier only all the way. This means I had to automatically reformat the code once.
Update pipeline
First of all: The long-running test we observed in #1193 is now working just fine when it's running in Vitest on Node 20 🤷
This allows us to run all tests in the pipeline again (and we definitely should). We should also aim for