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

Support absolute path to custom extension through haste package #3537

Merged
merged 1 commit into from
May 11, 2017

Conversation

thymikee
Copy link
Collaborator

Summary

This PR adds support for absolute resolution of files with custom extension in haste packages.

Jest support so-called "haste packages" which allow to place package.json with a name property providing a custom namespace for modules inside directory it resides. Since resolution for these haste packages use require.resolve, it doesn't support absolutely resolving custom extensions, like .ios.js or .android.js, it's just working with .js files.
Such resolution mechanism works in React Native, I think it would be nice for Jest to support it.

Fixes #3342.

Test plan

Integration test.

@codecov-io
Copy link

Codecov Report

Merging #3537 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3537      +/-   ##
==========================================
- Coverage   62.25%   62.25%   -0.01%     
==========================================
  Files         181      181              
  Lines        6706     6703       -3     
  Branches        6        5       -1     
==========================================
- Hits         4175     4173       -2     
  Misses       2528     2528              
+ Partials        3        2       -1
Impacted Files Coverage Δ
packages/jest-resolve/src/index.js 15.68% <0%> (-0.48%) ⬇️
...ntegration_tests/coverage_report/sum_dependency.js 0% <0%> (ø) ⬆️
integration_tests/coverage_report/sum.js 100% <0%> (+14.28%) ⬆️

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 afb4f7c...682995e. Read the comment docs.

@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.

Import component for specific platform with an alias
4 participants