-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
File paths shouldn't be reported with backslashes #6370
Comments
This should be the case in jest 23.1.0 and up, #6310 |
Wait no - we report with slash, but I suppose we still match on backslash? |
@JoshuaKGoldberg can you confirm if this is still an issue with latest Jest? |
I cannot confirm if this is an issue because I cannot run unit tests anymore. 🤷 #6546 |
I can confirm this: ❌
Using |
Ok, so it works like intended, then? We use forward slash in the reports, and if we use forward slash in the matching as well, then we're good. Closing, but if I misunderstood I'm happy to reopen |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
On Windows, file paths in tests reports on the CLI are reported using backslashes (likely from the default
path.join
):That's inconvenient because you can't run
jest <path-to-file>
to run just that file.jest src/my/directory/File.test.ts
jest src\my\directory\File.test.ts
To Reproduce
Steps to reproduce the behavior:
jest
or any flags variant that runs that filejest
on the CLIExpected behavior
Less proliferation of the inconvenience that is the backslash!
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: