Add rollup-plugin-istanbul to the README #159
Open
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.
I saw a mention to this package in this Playwright issue but as I saw in the README that it was intended to be used with
babel-plugin-istanbul
and I was not using it, I skipped it and used a copy of the baseFixtures.ts file directly. Later I noticed that this package is indeed the same code contained in that file with some extra features for env variables, so I replaced the baseFixtures.ts file with it.This pull request adds information to the README of the repo that the code should be instrumented with
istanbul-lib-instrument
but to do that one could use plugins that use this library to perform such a task, likebabel-plugin-istanbul
orrollup-plugin-istanbul
, so other users that are using the later to build their bundles could know that this package could be used to generate the coverage of the code withPlaywright
.In one of the packages that I maintain, I use rollup to build the final bundle, and to instrument the code I use rollup-plugin-istanbul. As I am using Playwright with Docker, I cannot use
nyc
to start the server, or whatnyc
will capture will be the usage of theplaywright.config.ts
file. I needed to use the report option of nyc once the coverage files were generated in the.nyc_output
folder. I also I addded a mention to this in the README to avoid giving the idea that running a server withnyc
is the only option to generate the final coverage.