Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rollup-plugin-istanbul to the README #159

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

elchininet
Copy link

@elchininet elchininet commented Dec 19, 2023

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, like babel-plugin-istanbul or rollup-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 with Playwright.

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 what nyc will capture will be the usage of the playwright.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 with nyc is the only option to generate the final coverage.

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