-
-
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
--findRelatedTests path case sensitivity on Windows #8900
Comments
I may try to fix that issue. Could someone give me an idea from where to start, please? |
The OP should include a reproduction, btw. Awesome you can work on this! As for where to start, I'd start by just sticking in breakpoints My guess is that tests are missing there, so just walk up the callstack until you find where we compare against files found on the FS. The issue is probably somewhere in https://github.com/facebook/jest/blob/554573036ae7529425aa157a1fd757612289abb5/packages/jest-resolve-dependencies/src/index.ts#L73-L136 |
We have a few integration tests that we skip on windows that might cover this (I haven't checked). You might be able to activate them? https://github.com/facebook/jest/blob/554573036ae7529425aa157a1fd757612289abb5/e2e/__tests__/jestChangedFiles.test.ts#L16 |
To debug the issue I've added this config in
https://github.com/facebook/jest/blob/554573036ae7529425aa157a1fd757612289abb5/packages/jest-core/src/SearchSource.ts#L268 Does it mean that I use wrong launch config to debug that or |
You're probably debugging the test and not jest itself when it executes the test. You need to put a breakpoint in the compiled code, so in |
The first issue that I face is I've passed this conclusion with some hacks and found one more checking in This time it's I'm not sure what a solution will be more elegant to handle case insensitivity here. Do you have any suggestions? -- |
Is there some check we can make for "is the FS case sensitive"? If we can, we could just normalize file paths in the And issue with fixing this btw is that you might end up with scripts that work on windows but not on mac/linux (e.g. |
What do you think about an alternative compact solution where we normalize |
Any updates on this? |
@netcoding87 I've made a pr, but some changes required. I'll try to fix them this year 😓 |
👍 Many thanks for your support! |
Fix for this issue has been released in v25.1.0 |
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
Running
jest --findRelatedTests <filepath>
with upper-cased part of path does not find any test.To Reproduce
Steps to reproduce the behavior:
git clone https://github.com/mbelsky/js-problems.git
cd js-problems
npm i
npx jest --findRelatedTests ./PROBLEMS/001-SUM.JS
Result:
Expected behavior
envinfo
The text was updated successfully, but these errors were encountered: