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

fix(findRelatedTests): edge cases with --findRelatedTests on Windows #11548

Merged
merged 6 commits into from Jun 14, 2021

Conversation

nicojs
Copy link
Contributor

@nicojs nicojs commented Jun 8, 2021

Summary

Allow hidden directories and special characters with --findRelatedTests on windows.

  • jest --findRelatedTests packages/@core/my-app.ts
  • jest --findRelatedTests packages/.hidden/my-hidden-app.ts
  • jest --findRelatedTests 'packages/programs (x86)/my-hidden-app.ts'

Fixes #11534
Fixes #9728

Test plan

I've tested this against the reproduction repo provided by @blephy in #11534 (comment)
I also added unit tests for this, which run on both linux and windows in CI

Allow hidden directories and special characters with `--findRelatedTests` on windows.
* `jest --findRelatedTests packages/@core/my-app.ts`
* `jest --findRelatedTests packages/.hidden/my-hidden-app.ts`
* `jest --findRelatedTests 'packages/programs (x86)/my-hidden-app.ts'`
@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2021

Codecov Report

Merging #11548 (bd36b97) into master (d1882f2) will increase coverage by 0.04%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11548      +/-   ##
==========================================
+ Coverage   68.94%   68.98%   +0.04%     
==========================================
  Files         312      312              
  Lines       16314    16319       +5     
  Branches     4726     4726              
==========================================
+ Hits        11247    11257      +10     
+ Misses       5039     5034       -5     
  Partials       28       28              
Impacted Files Coverage Δ
packages/jest-core/src/SearchSource.ts 80.71% <91.66%> (+5.15%) ⬆️
packages/expect/src/utils.ts 95.58% <0.00%> (-0.56%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1882f2...bd36b97. Read the comment docs.

@blephy
Copy link

blephy commented Jun 8, 2021

🥳

@nicojs
Copy link
Contributor Author

nicojs commented Jun 9, 2021

I don't know why CI is failing now. Probably unrelated..?

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonderful, thank you so much!

@SimenB SimenB merged commit 384d793 into jestjs:master Jun 14, 2021
@nicojs
Copy link
Contributor Author

nicojs commented Jun 15, 2021

@SimenB thanks a lot! This will help the Stryker community 💖

I was wondering: why is there separate win32 logic in the first place? Couldn't we simply remove it entirely?

@nicojs nicojs deleted the fix/find-related-paths-on-windows branch June 15, 2021 08:38
@SimenB
Copy link
Member

SimenB commented Jun 15, 2021

I was wondering: why is there separate win32 logic in the first place? Couldn't we simply remove it entirely?

No idea 😅 We can try to remove it and see what CI says?

@SimenB
Copy link
Member

SimenB commented Jun 22, 2021

https://github.com/facebook/jest/releases/tag/v27.0.5

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants