EvHaus / test-runner-benchmarks

A repository to measure performance of various JavaScript test runners
72 stars 13 forks source link

feat request: include @web/test-runner #464

Open trusktr opened 9 months ago

trusktr commented 9 months ago

Web Test Runner is an awesome unit test runner that runs tests in any web browser in any OS, as vanilla ES modules out of the box (esbuild and rollup build plugins optional), and is pretty dang fast for being a browser test runner, while keeping simplicity maximized.

All my unit tests are plain ESM with import maps and no build, which is a true productivity boon when build steps are not yet needed.

And although WTR accepts rollup and esbuild plugins, it is super easy to integrate with any build setup due to the fact it runs first and foremost as vanilla EDM, so you simply compile any code to plain EDM first and can then run it through WTR very easily.

EvHaus commented 9 months ago

Thanks for the suggestion. I spent an hour today trying to get Web Test Runner to work, but I can't find anyway to get past this failure:

 🚧 Browser logs:
      TypeError: Failed to fetch dynamically imported module: http://localhost:8000/benchmarks/web-test-runner/tests/original/Alert/Alert.test.tsx?wtr-session-id=_P4twHyiwDuLeC3icVRK4

 ❌ Could not import your test module. Check the browser logs or open the browser in debug mode for more information.

Are there any examples out there of how to use WTR for React/TypeScript projects? I couldn't find any.

I would appreciate some help here. Feel free to review my code in this branch and expand it from there.

xav-ie commented 6 months ago

I have not had a chance to look into this, but I did find a WTR examples repo.