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

On my machine, the `bundle` function takes ~500 ms on `main` and ~3.9 s on this branch. So there is definitely some overhead. We should probably either pass an extra flag to `run-web-platform-tests.js` to enable/disable the instrumentation, or create the instrumented bundle ahead of time.

Out of interest, I looked into whether we could use [c8](https://github.com/bcoe/c8) instead. Because c8 leverages Node's built-in coverage reporting, we wouldn't need to instrument the code ourselves and it *should* be almost as fast as a regular test run. I'm not sure if it'll work though: I was thinking we could make Browserify add a source map to the end of the bundle (by passing `{ debug: true }`), but I can't seem to figure out if/how Node's code coverage will recognize that source map when we run `window.eval(bundledJS)`. 😕

-- 
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-856319526

Received on Monday, 7 June 2021 23:10:45 UTC