Skip to content

vitest 2.0 beta.9 toMatchInlineSnapshot not work as expect #5873

@cqh963852

Description

@cqh963852

Describe the bug

While using vitest 2.0 beta.9 with browser mode.

toMatchInlineSnapshot api not work as expect

Reproduction

https://stackblitz.com/edit/vitejs-vite-qtngcz?file=src%2Ftest.spec.tsx

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @vitejs/plugin-react: ^4.3.1 => 4.3.1 
    @vitest/browser: ^2.0.0-beta.9 => 2.0.0-beta.9 
    vite: ^5.2.13 => 5.2.13 
    vitest: ^2.0.0-beta.9 => 2.0.0-beta.9

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: browserIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions