Skip to content

Comments are reported as not covered #238

Open
@HarelM

Description

@HarelM

I recently was trying to add coverage to my end to end tests.
I used this tool since my e2e run with puppeteer.
The code can be found here:
https://github.com/maplibre/maplibre-gl-js/blob/f197991152117c6e3964f824ebb6e3cec7d2d218/test/integration/render/run_render_tests.ts#L795C51-L795C51

When looking at the coverage in codecov I noticed that some lines were missing coverage, most of the line that I saw were comments and empty lines:
image

The coverage report here is a merge of the run in e2e and unit test (which uses jest).
When I tried to understand the difference I saw that they don't report the same way.
In jest the report is only on the "code line" and comments and empty lines are not part of the report, while when using v8 I get all the lines and those that are no covered, even if they are empty lines or comments are still reported as missing.

Is there something wrong with my setup?
Is this a known issue?

Here are the two main json coverage report files:
Jest report:
coverage-final.json
v8-to-istanbul
coverage-render.json

To see how things behave I looked at the scroll_zoom.ts part of the report.

Let me know if there's anything I can provide to help investigate this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions