Skip to content

Vitest v2 coverage is reporting 'Unexpected reserved word' error #6161

@meteorlxy

Description

@meteorlxy

Describe the bug

  • vitest run works well
  • vitest run --coverage fails
image

Reproduction

Repository: https://github.com/mdit-vue/mdit-vue
CI log: https://github.com/mdit-vue/mdit-vue/actions/runs/9992201242/job/27616645356

System Info

System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M1 Pro
    Memory: 334.61 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/Library/Caches/fnm_multishells/77642_1721308212385/bin/node
    npm: 10.5.0 - ~/Library/Caches/fnm_multishells/77642_1721308212385/bin/npm
    pnpm: 9.5.0 - ~/Library/Caches/fnm_multishells/77642_1721308212385/bin/pnpm
    Watchman: 2024.05.06.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 126.0.6478.182
    Safari: 17.4
  npmPackages:
    @vitest/coverage-istanbul: ^2.0.3 => 2.0.3 
    vitest: ^2.0.3 => 2.0.3

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: coverageIssues and PRs related to the coverage featurep3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions