l2beat / earl

☕ Ergonomic, modern and type-safe assertion library for TypeScript
https://earl.fun/
MIT License
256 stars 19 forks source link

Support node built-in test runner #297

Open neochrome opened 9 months ago

neochrome commented 9 months ago

Hi! Thanks for putting your time and effort into this awesome library!

We're currently looking at replacing Jest with the built-in test runner of node (since v18) and this project is almost a drop-in replacement, except for the snapshot validator. Currently it seems to accept Mocha and Uvu style TestContexts, but not the one available in native node. The main difference seems to be how to get the name of the suite. The node TestContext type can be found in @types/node/test.d.ts.

Would it perhaps make sense to extend the support to include also the native node one?

SamuelMarks commented 5 months ago

@krzkaczor Would be great to have this