Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace + browser mode = doesn't work #3885

Closed
6 tasks done
anilanar opened this issue Aug 3, 2023 · 1 comment
Closed
6 tasks done

Workspace + browser mode = doesn't work #3885

anilanar opened this issue Aug 3, 2023 · 1 comment

Comments

@anilanar
Copy link

anilanar commented Aug 3, 2023

Describe the bug

See reproduction.

It works fine in non-browser mode.

What seems to happen is vitest doesn't construct test file paths correctly. For ./packages/foo/foo.test.ts, it tries to run a test for ./foo.test.ts. In fact, manually changing the url search param path from foo.test.ts to packages/foo/foo.test.ts runs the correct test.

Reproduction

https://github.com/anilanar/vitest-workspace-browser-repro

System Info

System:
    OS: Linux 6.1 NixOS 23.05 (Stoat) 23.05 (Stoat)
    CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
    Memory: 52.21 GB / 62.74 GB
    Container: Yes
    Shell: 5.9 - /run/current-system/sw/bin/zsh
  Binaries:
    Node: 20.3.1 - /etc/profiles/per-user/aanar/bin/node
    npm: 9.6.7 - /etc/profiles/per-user/aanar/bin/npm
  Browsers:
    Brave Browser: 114.1.52.130
    Chromium: 114.0.5735.198
  npmPackages:
    @vitest/browser: ^0.34.1 => 0.34.1 
    vitest: ^0.34.1 => 0.34.1

Used Package Manager

npm

Validations

@sheremet-va
Copy link
Member

Fixed by #3947

@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants