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

Vitest with environment JSDOM not working on windows with lower-case drive letter #3776

Closed
6 tasks done
nicojs opened this issue Jul 15, 2023 · 1 comment · Fixed by #3836
Closed
6 tasks done

Vitest with environment JSDOM not working on windows with lower-case drive letter #3776

nicojs opened this issue Jul 15, 2023 · 1 comment · Fixed by #3836
Labels

Comments

@nicojs
Copy link
Contributor

nicojs commented Jul 15, 2023

Describe the bug

Vitest does not seem to work with a lower-case drive letter on windows when using testEnvironment: "jsdom"

c:\Users\nicoj\github\vitest-drive-letter>npx vitest --run

 RUN  v0.33.0 c:/Users/nicoj/github/vitest-drive-letter

 ❯ src/math.spec.js (0)

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL  src/math.spec.js [ src/math.spec.js ]
Error: No test suite found in file c:/Users/nicoj/github/vitest-drive-letter/src/math.spec.js
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

 Test Files  1 failed (1)
      Tests  no tests
   Start at  15:53:08
   Duration  1.17s (transform 36ms, setup 0ms, collect 118ms, tests 0ms, environment 613ms, prepare 153ms)


c:\Users\nicoj\github\vitest-drive-letter>cd ..

c:\Users\nicoj\github>cd "C:\Users\nicoj\github\vitest-drive-letter"

C:\Users\nicoj\github\vitest-drive-letter>npx vitest --run

 RUN  v0.33.0 C:/Users/nicoj/github/vitest-drive-letter

 ✓ src/math.spec.js (1)
   ✓ add (1)
     ✓ should result in 42 for 40 and 2

 Test Files  1 passed (1)
      Tests  1 passed (1)
   Start at  15:53:38
   Duration  1.09s (transform 37ms, setup 0ms, collect 25ms, tests 3ms, environment 608ms, prepare 152ms)

Reproduction

lower-case-letter.zip

Using windows:

  1. Unzip and cd into it
  2. npm i
  3. vitest --run -- this should work
  4. cd up 1 dir
  5. cd into the child dir using the full path, but with lower case drive letter: cd "c:\Users\nicoj\github\vitest-drive-letter"
  6. vitest --run -- see that it doesn't work.

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
    Memory: 4.48 GB / 31.73 GB
  Binaries:
    Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.3.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.82)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

npm

Validations

@nicojs nicojs changed the title Vitest not with environment JSDOM not working on windows with lower-case drive letter Vitest with environment JSDOM not working on windows with lower-case drive letter Jul 15, 2023
@sheremet-va
Copy link
Member

What terminal are you using?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants