Open trusktr opened 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.
I have not had a chance to look into this, but I did find a WTR examples repo.
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.