Skip to content

[Bug]: TypeError: Converting circular structure to JSON #726

@xiangechen

Description

@xiangechen

Version

System:
    OS: macOS 26.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 205.45 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
Browsers:
    Chrome: 142.0.7444.176
    Edge: 142.0.3595.94
    Safari: 26.1
npmPackages:
    @rstest/core: 0.6.8 => 0.6.8

Details

When a test fails, if there are circular references in the test object, serializing it to JSON will cause errors.
Image

Reproduce link

https://github.com/xiangechen/rstest

Reproduce Steps

  1. execute pnpm i
  2. execute pnpm run test
  3. find the error message in the console

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