News for hackers. Stuff that matters.
Re:Meta Is Transferring Jest to the OpenJS Foundation by lewisl9029 on Wednesday May 11, 2022 @11:39PM (#31349015)
Vitest is great for running unit tests, but for component testing I still think running in a real browser and using visual snapshots & diffs is preferable to dom snapshots & diffs in a fake browser env like node + jsdom.

It's not just the fact that jsdom doesn't fully support all browser APIs, but components are building blocks for a primarily visual medium, so being able to build and debug my component tests visually has been a complete game changer when it comes to productivity.

I think the very reasonable counterpoint to that is browser tests are slow to run, to the point that it's infeasible to run locally at scale. That's why for https://reflame.app, I've been building a testing strategy around using serverless compute to run browser component tests with maximum parallelization for a tight feedback loop that takes ~5s for a cold start and 1~2s thereafter, with dependency analysis to rerun only tests that could have changed to keep cost scaling under control.

Re:Meta Is Transferring Jest to the OpenJS Foundation by bilalq on Friday May 13, 2022 @06:45PM (#31373297)
Yeah, for sure. I'm still a fan of using Cypress for webapp integration testing.