silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
167 stars 17 forks source link

Replace Jest with Vitest #1544

Closed axelboc closed 5 months ago

axelboc commented 5 months ago

I was looking at testing H5WasmApi but ran into hair-pulling issues with Jest and its lack of stable support for ESM (h5wasm doesn't publish a CommonJS bundle ... and it shouldn't have to these days!) I did an initial foray into testing it with Vitest and it worked perfectly, so I decided to try the full migration from Jest to Vitest once again.

I'm happy to report that I've managed to successfully complete the migration this time around. There were a few tricky bits due to the fact that Testing Library was designed for Jest and does not yet fully support Vitest, but I was able to work around them.

And the result is great:

image