Comment by hungryhobbit
6 hours ago
They made some really terrible, non-standard decisions with node:test though. It's a real letdown for me.
You'd think unit testing would be the most already-solved problem in the world: just copy what Jest, Mocha, Vitest, etc. do ... and you're done.
Instead they left out major features and implemented other features in really strange "why are you reinventing the wheel" ways :(
I haven't used it, so I don't agree or disagree, but I'm curious: what do you think was left out or poorly implemented?
Honestly I forget now, as I first played around with it months? years? ago when it was pretty new.
But one thing that stood out was .only(). In every major testing framework IT'S ASSUMED the dev is going to want to run one test at a time (sometimes). They make it super simple: you throw a ".only()" on the test, and the test runner only runs it.
In Node, you instead need to pass some special command line flag or add .only to every describe above the test ... which just makes a basic operation (run one test) much harder than it needs to be ... for zero benefit whatsoever (again, just do it the way every other test runner does it).