Javascript coverage lines are incorrect

Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.
I have verified that my repository is using the Codecov GitHub app, if using GitHub
I have validated my codecov.yaml configuration file.
I have filled out the below sections to the best of my ability.


This file Codecov is showing a coverage of 98.91%

Hovever the ONLY unconvered line is line 40

Which obviously is an unexpected behavior, I am not sure how to fix this.

Also other files has similar issues, such as Codecov

But codecov does find some correct uncovered lines, link line 767-777 781-783

Here is the upload log:

Run codecov/codecov-action@v3
    PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
==> linux OS detected
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (20f9c9d78483fce977b6cc39e231a734a23bcd36f4d536bb7355222fb88d02bc  codecov)
==> Running version latest
==> Running version v0.3.2
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.1
[2022-12-05T06:26:40.845Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2022-12-05T06:26:40.868Z] ['info'] => Project root located at: /home/runner/work/vuepress-theme-hope/vuepress-theme-hope
[2022-12-05T06:26:40.869Z] ['info'] -> No token specified or token is empty
[2022-12-05T06:26:40.883Z] ['info'] Searching for coverage files...
[2022-12-05T06:26:41.145Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-12-05T06:26:41.146Z] ['info'] If Codecov did not locate your files, please review
[2022-12-05T06:26:41.147Z] ['info'] => Found 3 possible coverage files:
[2022-12-05T06:26:41.148Z] ['info'] Processing /home/runner/work/vuepress-theme-hope/vuepress-theme-hope/coverage/clover.xml...
[2022-12-05T06:26:41.152Z] ['info'] Processing /home/runner/work/vuepress-theme-hope/vuepress-theme-hope/coverage/coverage-final.json...
[2022-12-05T06:26:41.156Z] ['info'] Processing /home/runner/work/vuepress-theme-hope/vuepress-theme-hope/coverage/tmp/coverage-2711-1670221599465-49.json...
[2022-12-05T06:26:41.322Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-12-05T06:26:41.324Z] ['info'] Pinging Codecov:*******&branch=main&build=3617489886&
[2022-12-05T06:26:41.993Z] ['info']
[2022-12-05T06:26:41.993Z] ['info'] Uploading...
[2022-12-05T06:26:42.219Z] ['info'] {"status":"success","resultURL":""}

@Mister-Hope this is coming directly from the coverage reports(click Download on the right bar) being uploaded to Codecov.

      <file name="sub.ts" path="/home/runner/work/vuepress-theme-hope/vuepress-theme-hope/packages/md-enhance/src/node/markdown-it/sub.ts">
        <metrics statements="92" coveredstatements="91" conditionals="16" coveredconditionals="14" methods="3" coveredmethods="3"/>
        <line num="40" count="0" type="stmt"/>

What’s strange is that it’s also instrumenting the comment at the top of the file. I’m not familiar enough with vitest to guide more past this point, but I’m assuming there’s something wrong with how coverage is being instrumented or collected.