-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
Description
Describe the bug
Starting with vitest v4.07 the URL class name when using jsdom is URL$1. I would expect it to be URL instead. I think this is probably from #8935.
This is a problem because some libraries, like devalue, depend on the string names of builtin classes being correct. They don't use instanceof because they want to work on objects from other realms.
Reproduction
- Clone https://github.com/TomerAberbach/vitest-url-bug
- Run
pnpm test
System Info
System:
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Max
Memory: 7.62 GB / 32.00 GB
Shell: 4.4.0 - /opt/homebrew/bin/fish
Binaries:
Node: 25.6.1 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 11.9.0 - /opt/homebrew/bin/npm
pnpm: 10.29.3 - /opt/homebrew/bin/pnpm
bun: 1.3.9 - /opt/homebrew/bin/bun
Deno: 2.6.10 - /opt/homebrew/bin/deno
Browsers:
Chrome: 145.0.7632.117
Edge: 145.0.3800.82
Firefox: 147.0.4
Safari: 17.6
npmPackages:
vitest: 4.0.7 => 4.0.7Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable