Fixed the bug where mocking a file with the filename resolved as backticks would fail#5426
Fixed the bug where mocking a file with the filename resolved as backticks would fail#5426cpojer merged 7 commits intojestjs:masterfrom
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #5426 +/- ##
=======================================
Coverage 62.18% 62.18%
=======================================
Files 205 205
Lines 6928 6928
Branches 3 4 +1
=======================================
Hits 4308 4308
Misses 2619 2619
Partials 1 1Continue to review full report at Codecov.
|
SimenB
left a comment
There was a problem hiding this comment.
Unless I misunderstand, the added test does not cover the original issue. See inline comment
|
|
||
| ### Fixes | ||
|
|
||
| * `[mock]` Add backticks support (\`\`) to `mock` a certain package via the `__mocks__` folder. |
There was a problem hiding this comment.
please include a link to this PR
| }, | ||
| }; | ||
| }); | ||
| jest.mock('../__test_modules__/jest-backticks'); |
There was a problem hiding this comment.
You're absolutelly right, I was testing if the backticks were really working and forgot to update this. Thanks :)
…angelog with the PR link
|
|
||
| ### Fixes | ||
|
|
||
| * `[mock]` Add backticks support (\`\`) to `mock` a certain package via the `__mocks__` folder.([#5426](https://github.com/facebook/jest/pull/5426)) |
There was a problem hiding this comment.
Should this be [jest-mock]?
There was a problem hiding this comment.
You're right. I meant to fix that - forgot, though. Thanks!
…ticks would fail (jestjs#5426) * Fixed the bug where mocking a file with the filename resolved as backticks would fail * Updated changelog * Added license info * Fixed the unit test related to the backticks issue and updated the changelog with the PR link * Update CHANGELOG.md * Update CHANGELOG.md
|
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. |
Summary
Related with issue #5368
This fixes a bug that needed the following conditions:
__mocks__folder.mockfunction with backticks (``).Test plan
Added tests to the
babel-plugin-jest-hoistpackage. Also added a__mocks__folder there to replicate this issue.