Skip to content

Instantly share code, notes, and snippets.

@mxschmitt
Last active June 30, 2021 15:58
Show Gist options
  • Save mxschmitt/3d5c27b8410ce27695df0ef2b9a575a3 to your computer and use it in GitHub Desktop.
Save mxschmitt/3d5c27b8410ce27695df0ef2b9a575a3 to your computer and use it in GitHub Desktop.
Use Istanbul coverage collection with Playwright Test (https://github.com/microsoft/playwright/issues/7030)
@anfruiz
Copy link

anfruiz commented Jun 24, 2021

I'm implementing this solution to run my tests in my angular appbut the directory .nyc_output is generated empty. I don't know if I configure the babel plugin wrong... Can you help me please? I'm new in this awesome world of playwright

@mxschmitt
Copy link
Author

Please comment under the original issue (microsoft/playwright#7030). It only works when you are using the Playwright fixtures context and page and not launching your own browser. See here for a reference how it works. Attached code to reproduce there would be also helpful.

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