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

Match imports by file ext in Jest test config #363

Merged
merged 5 commits into from
Jan 11, 2017
Merged

Match imports by file ext in Jest test config #363

merged 5 commits into from
Jan 11, 2017

Conversation

julianvmodesto
Copy link
Contributor

@julianvmodesto julianvmodesto commented Jan 11, 2017

Issue

#362

The regex in the Jest moduleNameMapper isn't matching modules that are prefixed with Webpack loaders (e.g. import 'styles!css!./styles.css) , so modules aren't being stubbed.

Changes

Updated the regex to only match modules by file extension.

cc @tizmagik

@julianvmodesto julianvmodesto changed the title Jest moduleNameMapper: match modules by extension Match imports by file ext in Jest test config Jan 11, 2017
Copy link
Contributor

@tizmagik tizmagik left a comment

Choose a reason for hiding this comment

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

Sweet, thank you! Nice job with the test too 👍

@tizmagik tizmagik merged commit c1103f1 into nytimes:master Jan 11, 2017
@julianvmodesto julianvmodesto deleted the jest-modulenamemappers-regex branch January 11, 2017 22:04
delambo added a commit that referenced this pull request Feb 7, 2017
* master:
  Fix typo (#379)
  kyt-cli version bump (#376)
  updates the kyt-cli version (#370)
  fixes cli starter kyt path bug (#369)
  Adds prep for 0.4.0 release candidate (#368)
  Adding identity object property; fixing preprocessor bug (#367)
  Adds yarn support with npm fallback (#270)
  Fix typo (#366)
  Match imports by file ext in Jest test config (#363)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants