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

jest-haste-map: add test+fix for broken platform module support #3885

Merged
merged 1 commit into from
Jun 27, 2017

Conversation

jeanlauliac
Copy link
Contributor

When two platform variants of a single module ID change at the same time (ex. often happening after a far rebase), jest was loosing one of them, depending on the ordering of the change events. This is because it doesn't care about platform variants and deletes the whole module metadata every time. This is probably here for historical reasons, from before the introduction of platform extensions, and wasn't unit-tested.

This changeset adds a test and the corresponding fix for this behaviour. I wrote the test first and could see it failing if the correct fix is not added as well.

@codecov-io
Copy link

Codecov Report

Merging #3885 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3885      +/-   ##
==========================================
+ Coverage   58.07%   58.12%   +0.04%     
==========================================
  Files         195      195              
  Lines        6734     6741       +7     
  Branches        6        6              
==========================================
+ Hits         3911     3918       +7     
  Misses       2820     2820              
  Partials        3        3
Impacted Files Coverage Δ
packages/jest-haste-map/src/index.js 92.8% <100%> (+0.2%) ⬆️

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 e7b0a07...2f80754. Read the comment docs.

@jeanlauliac jeanlauliac requested a review from aaronabramov June 23, 2017 12:35
@cpojer
Copy link
Member

cpojer commented Jun 27, 2017

Looks good. Can you rebase this quickly?

@jeanlauliac jeanlauliac force-pushed the platform-change-bug-fix branch from 2f80754 to c3e43cd Compare June 27, 2017 09:15
@cpojer cpojer merged commit 88e2ee8 into jestjs:master Jun 27, 2017
@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 13, 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.

4 participants