Skip to content

[Bug]: Broken coverage in Browser mode #917

@jesusgalhub

Description

@jesusgalhub

Version

System:
    OS: macOS 26.2
    CPU: (10) arm64 Apple M5
    Memory: 86.16 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 144.0.7559.97
    Firefox: 146.0
    Safari: 26.2
  npmPackages:
    @rstest/browser: 0.8.1 => 0.8.1 
    @rstest/core: 0.8.1 => 0.8.1 
    @rstest/coverage-istanbul: 0.2.0 => 0.2.0

Details

I was following the documentation to create a test suite where I mix node and browser tests (https://rstest.rs/config/test/browser#mixing-with-node-tests). After I run the tests with coverage, an error is prompt:

Image

Furthermore, the browser mode seems to not follow headless mode. I can't execute it without the browser appearing visually.

Reproduce link

https://codesandbox.io/p/devbox/2lt7tv

Reproduce Steps

  1. Execute npm install
  2. Execute npm exec playwright install chromium
  3. Execute npm run test

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions