Skip to content

[Bug]: Reporter lifetime functions not being called in browser mode #970

@jesusgalhub

Description

@jesusgalhub

Version

System:
    OS: macOS 26.2
    CPU: (10) arm64 Apple M5
    Memory: 73.97 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.5 => 0.8.5 
    @rstest/browser-react: 0.8.5 => 0.8.5 
    @rstest/core: 0.8.5 => 0.8.5 
    @rstest/coverage-istanbul: 0.2.0 => 0.2.0

Details

I have a custom reporter (the one in the examples). The following functions are not called when filtering by a browser project:

  • onTestRunStart
  • onTestFileReady
  • onTestSuiteStart
  • onTestCaseStart
  • onTestSuiteResult

I have a custom logger but can't be implemented properly without some of these lifecycles...

Image

Reproduce link

https://codesandbox.io/p/devbox/2lt7tv?file=%2Frstest.config.mjs%3A24%2C23

Reproduce Steps

  1. npm install
  2. npx playwright install
  3. Compare between: npm run test, npm run test:browser, npm run test:node

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions