-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
After upgrading Vitest in the date-fns codebase ([email protected]
-> [email protected]
& @vitest/[email protected]
-> @vitest/[email protected]
) I started getting many of these errors:
SyntaxError: Failed to construct 'WebSocket': The URL 'ws://localhost:undefined/' is invalid.
❯ setupWebSocket /@vite/client:505:20
❯ fallback /@vite/client:484:22
❯ WebSocket.<anonymous> /@vite/client:520:13
As the result npx vitest run --browser
hangs forever, even though the tests pass when I open it with --ui
.
Reproduction
git clone [email protected]:date-fns/date-fns.git
cd date-fns
npm install
npm install -D @vitest/ui
npx vitest --browser --ui
It will open the browser where you can see the errors:
System Info
System:
OS: Linux 5.15 Ubuntu 20.04.1 LTS (Focal Fossa)
CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.01 GB / 31.31 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 20.10.0 - ~/.asdf/installs/nodejs/20.10.0/bin/node
Yarn: 1.22.21 - ~/.asdf/installs/nodejs/20.10.0/bin/yarn
npm: 10.2.3 - ~/.asdf/plugins/nodejs/shims/npm
bun: 1.0.25 - ~/src/date-fns/date-fns/node_modules/.bin/bun
Browsers:
Chrome: 103.0.5060.114
npmPackages:
@vitest/browser: ^1.3.1 => 1.3.1
@vitest/coverage-v8: ^1.3.1 => 1.3.1
vitest: ^1.3.1 => 1.3.1
Used Package Manager
npm
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.
stepankuzmin
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Type
Projects
Status
Has plan