-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Test running overhaul, switch to Prettier & reformat everything #1407
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 running overhaul, switch to Prettier & reformat everything #1407
Conversation
Seems the switch to Node 20 and Vitest has vastly improved the code's and / or the test's runtime! see #1193
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 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.
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