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

chore: make sure to call realpath when accessing cwd #7613

Merged
merged 2 commits into from
Jan 14, 2019

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jan 12, 2019

Summary

More from #7556. There's quite a few places we access cwd, even though we have a cwd in ProjectConfig already. Instead of realpathing them again, we should reuse the one from config.

Also consistently realpath cwd in the places where we don't have config.

/cc @willsmythe

Test plan

Green CI

@codecov-io
Copy link

codecov-io commented Jan 12, 2019

Codecov Report

Merging #7613 into master will decrease coverage by <.01%.
The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7613      +/-   ##
==========================================
- Coverage   68.26%   68.26%   -0.01%     
==========================================
  Files         249      249              
  Lines        9623     9626       +3     
  Branches        5        6       +1     
==========================================
+ Hits         6569     6571       +2     
- Misses       3052     3053       +1     
  Partials        2        2
Impacted Files Coverage Δ
packages/jest-cli/src/getNoTestFound.js 57.14% <ø> (ø) ⬆️
packages/jest-cli/src/lib/init/index.js 87.8% <ø> (ø) ⬆️
packages/jest-cli/src/getNoTestsFoundMessage.js 60% <ø> (ø) ⬆️
packages/jest-resolve/src/index.js 57.5% <100%> (ø) ⬆️
packages/jest-cli/src/SearchSource.js 58.22% <100%> (+0.53%) ⬆️
packages/jest-cli/src/runJest.js 75% <60%> (-1%) ⬇️
packages/babel-jest/src/index.js 76.19% <80%> (+1.19%) ⬆️

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 94c40a5...a9e9414. Read the comment docs.

return {
canInstrument: true,
getCacheKey(
fileData: string,
filename: Path,
configString: string,
{instrument, rootDir}: CacheKeyOptions,
{config, instrument, rootDir}: {config: ProjectConfig} & CacheKeyOptions,
Copy link
Contributor

Choose a reason for hiding this comment

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

packages/jest-cli/src/runJest.js Show resolved Hide resolved
@SimenB SimenB changed the title chore: make sure to call realpath in on when accessing cwd chore: make sure to call realpath when accessing cwd Jan 12, 2019
@SimenB
Copy link
Member Author

SimenB commented Jan 14, 2019

@thymikee updated 🙂

"putput" 😅

@SimenB SimenB merged commit 32c3788 into jestjs:master Jan 14, 2019
@SimenB SimenB deleted the realpath-cwd branch January 14, 2019 16:05
captain-yossarian pushed a commit to captain-yossarian/jest that referenced this pull request Jul 18, 2019
@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 May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants