playwright-test-coverage
playwright-test-coverage copied to clipboard
Does it work for Angular CLI project?
I tried to so the same for an Angular CLI project.
I'd assume having nyc to instrument the ng serve would populate the coverage result into .nyc_output folder. However, I have it populated but the data is empty.
playwright.config.ts
webServer: {
command: 'npx nyc ng serve',
port: 3000,
},
Why does this not work?
@sh977218 have you found a solution?
@testgitdl No, I have not. This repo only works with React, because its ability of modifying the code during compilation. But with Angular's default build, it's very hard to do.
for whoever is interested to have nyc code coverage enabled for Angular CLI project, the Angular bootstrap project has a perfect example. Starting from this line, e2e-app/coverage.webpack.js.