Re: [whatwg/streams] Fix coverage script for reference implementation (#1135)

I managed to get c8 working! 😁

Turns out that Node's `vm.Script` (which jsdom uses for `eval()`) is quite finicky about source maps, so I need to massage it a bit by adding a `// #sourceURL` comment. That URL also has to point to an *actual file*, so I'm now running Browserify separately as part of `pretest` and have it write to `bundle.js`. (I wanted to make it write to `generated/bundle.js`, but then the file names in the coverage report are wrong... 🙄)

If it's too farfetched, I can revert back to Istanbul if you want. But I thought this approach would be nicer, since it doesn't negatively affect test runs without coverage. 🙂

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1135#issuecomment-857221987

Received on Tuesday, 8 June 2021 22:28:58 UTC