feature: adds javascript coverage information for storycap crawls #602
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch introduces support for emitting coverage information as collected by Puppeteer workers. I've taken some liberties with how this is supported in the CLI, the main requirement being that the
v8-to-istanbul
library requires an actual path on disk to the covered code in order to work.Otherwise this code should be relatively straightforward, mostly making use of existing puppeteer API's (albeit in a way that required upgrading the puppeteer dependency; i'm not sure off hand if there are breaking changes that would necessitate a breaking change for this library) and existing node modules for interoperating with puppeteer/istanbul coverage data.
This branch doesn't yet have any tests, end to end, or otherwise...very open to adding anything else here, depending on what seems needed!
TODO:
--coverage
. Not clear yet if this is an issue with storybook/webpack, or thenyc
/istanbul toolchain, or something else...it might be an edge case to support storybook coverage for monorepo-symlinked sibling modules!