You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: Make sure to run these steps on a Windows machine in a command prompt. Command prompt recommended because depending on the version of Powershell, Powershell might normalize the directory name including the drive letter, which results in not being able to reproduce this issue.
Clone this repository anywhere on your local machine
Navigate to the directory this project was cloned on, making sure to use an absolute path that contains the lowercasec:/ drive letter.
For example:
cd c:/<repo path>
Run npm install
Run npm run test
Note the failing test (I have the test setup to expect a specific mocked value)
Navigate to this same directory, making sure to use an absolute path that contains the uppercasec:/ drive letter.
For example:
cd C:/<repo path>
Run npm run test again
Note the succeeding test (the mocked value is returned in this case, so the test passes)
Describe the bug
When using manual mocks, the mock doesn't seem to work when vitest is run on a lowercase drive (i.e. running on c:\ vs C:).
This seems to be related to #5251, but I'm opening this as a separate issue since I think it relates to a different part of the code.
Reproduction
Using an example repository I created for this example: https://github.com/dylanclaywell/lowercase-test
NOTE: Make sure to run these steps on a Windows machine in a command prompt. Command prompt recommended because depending on the version of Powershell, Powershell might normalize the directory name including the drive letter, which results in not being able to reproduce this issue.
Clone this repository anywhere on your local machine
Navigate to the directory this project was cloned on, making sure to use an absolute path that contains the lowercase
c:/
drive letter.For example:
Run
npm install
Run
npm run test
Note the failing test (I have the test setup to expect a specific mocked value)
Navigate to this same directory, making sure to use an absolute path that contains the uppercase
c:/
drive letter.For example:
Run
npm run test
againNote the succeeding test (the mocked value is returned in this case, so the test passes)
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: