Skip to content

Upgrading dependencies broke the coverage report #5101

@Aragur

Description

@Aragur

Describe the bug

Upgrading my dependencies broke the coverage file write.

> twogo-webapp@0.0.1 test:unit {{path_removed}}
> vitest "--run" "--coverage"


 RUN  v0.34.6 {{path_removed}}
      Coverage enabled with v8

 ✓ tests/unit/views/ErrorView.spec.ts (1)
 ✓ tests/unit/views/LoggedOutView.spec.ts (2)
 ✓ tests/unit/App.spec.ts (1)
 ✓ tests/unit/main.spec.ts (5)
SonarQube report written to {{path_removed}}/coverage/sonar-report.xml

 Test Files  4 passed (4)
      Tests  9 passed (9)
   Start at  10:10:20
   Duration  2.20s (transform 1.08s, setup 418ms, collect 5.63s, tests 71ms, environment 563ms, prepare 287ms)

JUNIT report written to {{path_removed}}/coverage/junit.xml

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
TypeError: The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received '{{path_removed}}/coverage/lcov-report/\x00vite'
 ❯ Object.mkdirSync node:fs:1371:10
 ❯ module.exports.sync node_modules/.pnpm/make-dir@4.0.0/node_modules/make-dir/index.js:113:6
 ❯ FileWriter.writeFile node_modules/.pnpm/istanbul-lib-report@3.0.1/node_modules/istanbul-lib-report/lib/file-writer.js:184:16
 ❯ HtmlReport.onSummary node_modules/.pnpm/istanbul-reports@3.1.6/node_modules/istanbul-reports/lib/html/index.js:364:44
 ❯ LcovReport.<computed> [as onSummary] node_modules/.pnpm/istanbul-reports@3.1.6/node_modules/istanbul-reports/lib/lcov/index.js:28:23
 ❯ Visitor.value node_modules/.pnpm/istanbul-lib-report@3.0.1/node_modules/istanbul-lib-report/lib/tree.js:38:38
 ❯ ReportNode.visit node_modules/.pnpm/istanbul-lib-report@3.0.1/node_modules/istanbul-lib-report/lib/tree.js:86:21
 ❯ node_modules/.pnpm/istanbul-lib-report@3.0.1/node_modules/istanbul-lib-report/lib/tree.js:92:19
 ❯ ReportNode.visit node_modules/.pnpm/istanbul-lib-report@3.0.1/node_modules/istanbul-lib-report/lib/tree.js:91:28

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'ERR_INVALID_ARG_VALUE' }

Reproduction

https://github.com/Aragur/vitest-bug-2024_01

System Info

System:
    OS: macOS 14.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 118.75 MB / 16.00 GB
    Shell: 3.7.0 - /opt/homebrew/bin/fish
  Binaries:
    Node: 21.6.1 - /opt/homebrew/bin/node
    npm: 10.2.4 - /opt/homebrew/bin/npm
    pnpm: 8.15.1 - /opt/homebrew/bin/pnpm
    bun: 1.0.25 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 121.0.6167.85
    Safari: 17.3
  npmPackages:
    @vitejs/plugin-vue: ~5.0.3 => 5.0.3 
    @vitest/coverage-v8: ~0.34.4 => 0.34.6 
    vite: ~5.0.12 => 5.0.12 
    vitest: ~0.34.4 => 0.34.6

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: coverageIssues and PRs related to the coverage feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions