Remix.run Logo
OptionOfT 19 hours ago

Vitest does not support CommonJS mocking as of today.

I switched to Vitest because Jest was giving me flaky coverage results: https://github.com/nodejs/node/issues/51251

And while Vitest' coverage is stable, I had to add an indirection layer to change how I mock out calls to GitHub's API (@github/octokit).

Oh, side note: vite-node's --watch functionality does not restart the process. It does hot reloading which is different enough that it requires some rework at how you set up your app structure and callbacks.

pcb-rework 19 hours ago | parent [-]

The problem is jest is run by megacorp Meta, so it won't be fixed in any reasonable timeframe because they're all about new features to make "impact". Its FOSS contributors are typically slow and working primarily to keep their jobs. Also, with node > 20.9.0 being broken and node = 20.9.0 not being a viable option by being insecure, so it's worth having a look at alternatives like bun or deno because it does seem to have lost its way too. I'm currently pinned to 20.9.0 for system dependencies, but use bun for new dev.

cowsandmilk 18 hours ago | parent [-]

As described in the article, Jest is no longer run by Meta and its primary maintainers don’t work there.

I also would argue Jest development slowed down after Meta transferred the project to OpenJS, so…

pcb-rework 8 hours ago | parent [-]

> Please don't comment on whether someone read an article.

https://news.ycombinator.com/newsguidelines.html

A rotten apple doesn't roll far from the tree. The vast majority of Meta projects and former projects are garbage. If you need to ask why, because it's experience.