Skip to content

toMatchInlineSnapshot fails when used in a file path with parentheses #3370

@pacexy

Description

@pacexy

Describe the bug

When using the toMatchInlineSnapshot, I encountered a problem where the function fails to work when used in a file path that includes parentheses.

Screenshot

image

Reproduction

Stackblitz: https://stackblitz.com/edit/node-7qhuzi?file=(foo)/bar.test.js

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor                 
    Memory: 4.45 GB / 31.93 GB
  Binaries:
    Node: 18.16.0 - D:\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
    Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 9.5.1 - D:\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
  Browsers:
    Chrome: 113.0.5672.93
    Edge: Spartan (44.19041.1266.0), Chromium (113.0.1774.42)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vitest: ^0.31.0 => 0.31.0

Used Package Manager

npm

Validations

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