Skip to content

Unstable Vitest Runs – Occasional Error Without Clear Cause #4152

@ThomasCode92

Description

@ThomasCode92

Bug report

Description / Observed Behavior

When running unit tests with Vitest, the following error occasionally occurs:
Image
This issue does not appear consistently—it happens intermittently, which suggests a possible race condition. However, I'm unsure where to begin investigating or how to reliably reproduce it.

Expected Behavior

The test suite should run reliably without this error, or the error should be reproducible and consistent across test runs.

Repro Steps / Code Example

The issue is difficult to reproduce consistently, and the code base is in a private repo.

Additional Context

  • SWR version: 2.3.0
  • Vitest version: 3.2.4
  • I use jsdom (26.1.0) as the test environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions