qunitjs / qunit

🔮 An easy-to-use JavaScript unit testing framework.
https://qunitjs.com
MIT License
4.02k stars 783 forks source link

Better ESM support #1728

Open NullVoxPopuli opened 9 months ago

NullVoxPopuli commented 9 months ago

Resolves: https://github.com/qunitjs/qunit/issues/1724

(however, I can't run tests locally, because the browser launcher is puppeteer, and some ancient browser that I don't have installed :sweat_smile:

>> There was an error with headless chrome
Fatal error: Could not find browser revision 818858. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.

)

I had started with an esm.html file to test with, but script.type=module doesn't allow the file protocol when loading modules, so we'd have to use an http server, but then the relative file paths for the link / importmap / script.src wouldn't work the same.