Skip to content

Get zero coverage in monorepo #5

@jfulse

Description

@jfulse

Hello! I'm having some issues getting coverage in a monorepo where Playwright runs from a folder root/e2e-tests/ and tests a server located at root/frontend/. I start the server and follow the instructions from the Readme, but end up with:

================ Coverage summary ================
Statements   : Unknown% ( 0/0 )
Branches     : Unknown% ( 0/0 )
Functions    : Unknown% ( 0/0 )
Lines        : Unknown% ( 0/0 )
==================================================

I've tried various fixes, including pointing sourceRoot to the monorepo root and to the server folder.

I've had a similar issue setting trying to set up the coverage myself following https://playwright.dev/docs/api/class-coverage. Maybe I have a step missing? I think I don't need to instrument the server code using babel-plugin-istanbul, due to using v8 directly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions