> But I have zero clue what those other tools are.
The incorporated tools are actually really amazing:
- vitest, an ultra fast test runner. After using a lot of others, including jest and node's built in one, I love vitest.
- oxlint, replaces eslint but is compatible with its file format and ultra fast, since it isn't written JavaScript. I tried biome, but I found oxlint to have more rules and the eslint compatibility was nice.
- oxfmt, replaces prettier and is faster since it isn't written in JavaScript.
- rolldown, replaces rollup and is compatible with it but it is much faster since it isn't written in JavaScript.
The above are my go-tos in new projects anyhow since they are killer good and fast.
I don't get how a test runner can be "ultra fast". Surely all the time is taken by the tests, not calling the test functions?
At work we've tried switching to vitest, and it's 1.5-2x slower than Jest (I think it's related to our very large and circular module graph), so performance is very much a your-mileage-may-vary thing.
The initial selling point was performance, but then they gradually realized that a lot of the slow cruft in Jest was necessary for correctness, and now it's about the same performance as Jest (obviously may vary in some specific situation).
However vitest is still great! Selling points now are stuff like:
- shares config with vite
- works with ESM out of the box (I think Jest still doesn't)
- integrated browser testing mode that is very nice
- overall just has a ton of nicely integrated features
I do recommend turning off "isolate" for as much of your code base as possible when it makes sense. And I recommend ensuring "maxWorkers" is being used properly, I prefer something like 60% of my totals cores as the number of workers to use. And use a top level vitest start so it properly runs all the packages in a pipeline rather than as separate vitest runs (which would mess up the maxWorkers optimization anyhow.)
I have my 3000 test project suite completing in 15 seconds on my MacBook Air M3. It is pretty sweet with that setup.
Say this again when you have worked with Jest, one of the worst and slowest pieces of software I've ever worked with.
And Jest was itself a huge step up from what came before (Jasmine, Mocha...)
I switched to Jest from Mocha and my memory is that Mocha was much faster.
You'd be surprised how slow the JS ecosystem can be.
> Surely all the time is taken by the tests, not calling the test functions?
Calling tests has overhead. Also knowing how to schedule and parallelize tests with dependencies is not as "simple".
I wish Oxfmt supported plugins. Prettier's plugin API is one of the worst APIs I've ever worked with. I'm eager to switch to a different formatter with a better plugin API (and I need plugins).
I was excited about Oxfmt until I tried it and found that it's mostly intended to be a Prettier replacement. Ugh.
I'm curious to know what you were hoping for. Are there features you're looking for in a formatter that prettier/oxfmt don't offer?
I was hoping for something more flexible. I suppose the whole point of Prettier is that it's not flexible but I find 90% of the times the code is actually uglier when using it.
Try Biome then. But Oxfmt is still faster.
Have you tried contributing a system for that?
Rolldown is used in Vite (non plus) though.