You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nyc automatically instruments the code running in the node process (and any subprocesses), but the bundled code will not be instrumented.
Potential implementation
I've actually worked on a similar tool which also bundles code and runs it in the browser and reports back to the console. We implemented nyc support by:
With puppet-run, 1 and 3 would remain conceptually the same, but as far as I can tell, Parcel doesn't have an instrumentation plugin. I'm also unsure if it's possible to conditionally apply plugins.
I think the better solution might be to instrument the code after it goes through parcel and rely on sourcemaps to get accurate code coverage. babel-plugin-istanbul supports passing an inputSourcemap so the sourcemaps output by Parcel could be passed along.
The text was updated successfully, but these errors were encountered:
It would be really nice to get coverage reports by using
nyc
:nyc
automatically instruments the code running in the node process (and any subprocesses), but the bundled code will not be instrumented.Potential implementation
I've actually worked on a similar tool which also bundles code and runs it in the browser and reports back to the console. We implemented
nyc
support by:nyc
window.__coverage__
variable which the instrumenting reports to and sending it back to the serverWith
puppet-run
, 1 and 3 would remain conceptually the same, but as far as I can tell, Parcel doesn't have an instrumentation plugin. I'm also unsure if it's possible to conditionally apply plugins.I think the better solution might be to instrument the code after it goes through parcel and rely on sourcemaps to get accurate code coverage.
babel-plugin-istanbul
supports passing aninputSourcemap
so the sourcemaps output by Parcel could be passed along.The text was updated successfully, but these errors were encountered: