bcoe / bcoe/c8

c8 coverage is the same when running Playwright tests

Open
#427 7 comments 0 reactions 0 assignees View on GitHub
help wanted question
Dominant language
JavaScript
Stars
2.1k
Forks
99
PR merge metrics
No merged PRs in 30d

Description

* **Version**: 7.12.0
* **Platform**: Windows

I have an Angular app for which I'm running BDD tests with cucumberjs + Playwright and what I need is to know how much of the app code I have covered with my tests.
For this, I've build my app, I've started it via "ng serve -c dev" and I start c8 when running my tests.
The problem is that the coverage report is always the same - it does not take into account the tests I've executed.

Here are the scripts:
``
"serve": "ng serve -c dev",
"playwright-chrome": "start-server-and-test serve http://localhost:4200 test-bdd-chrome",
"test-bdd-chrome": "SET NODE_OPTIONS=--loader ts-node/esm --loader ./loader.js --no-warnings --experimental-specifier-resolution=node && node ./node_modules/@cucumber/cucumber/bin/cucumber.js --tags \"@xxx\"",
"playwright-coverage": "c8 npm run playwright-chrome"
``
What am I doing wrong? Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.