Skip to content

Conversation

@saranrapjs
Copy link

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:

  • In one yarn-based monorepo I've tested with, Storybook's webpack will include sourcemaps and coverage information for non-relative path files as if they were in the same directory as the main source code described by --coverage. Not clear yet if this is an issue with storybook/webpack, or the nyc/istanbul toolchain, or something else...it might be an edge case to support storybook coverage for monorepo-symlinked sibling modules!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant