Skip to content

[Bug]: Browser mode does not register Rstest API #964

@jesusgalhub

Description

@jesusgalhub

Version

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

Details

When I execute tests in browser mode AND a setup file that access rstest api methods, like 'beforeEach',
Then I got an error, because the rstest api is not registered.

Image

Reproduce link

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

Reproduce Steps

  1. npm install
  2. npx playwright install-deps
  3. 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