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

Tighten up module mappers to prevent hard-to-debug bugs #53

Merged
merged 3 commits into from
Sep 6, 2017

Conversation

thymikee
Copy link
Owner

@thymikee thymikee commented Jul 2, 2017

Fixes #41
Fixes #37

In #6 we introduced very loose moduleNameMapper which resulted in couple of weird bugs and until next Jest release it's impossible to override it.

This PR reverts it and adds some reasonable defaults.

Also, because of this "(.*)"mapping, while debugging #41 on master version of Jest, I encountered an issue where one of the internal Jest modules was calling path matching the regexp, but couldn't find it under src dir. This surfaced only because Jest version on master supports checking if modules in moduleNameMapper exist and throws otherwise.

@thymikee thymikee mentioned this pull request Jul 2, 2017
@thymikee
Copy link
Owner Author

thymikee commented Jul 2, 2017

Targeting this to 3.0.0 release.
This is currently failing on purpose. Waiting for next Jest release to fix one more thing, thanks to this PR: jestjs/jest#3689.

@cgatian
Copy link

cgatian commented Jul 2, 2017

@thymikee Thank you!

@Tallyb
Copy link
Contributor

Tallyb commented Jul 7, 2017

Do they have a due date for new jest release?

@thymikee
Copy link
Owner Author

thymikee commented Jul 7, 2017

No, it's done when it's done. Jest doesn't have any release scheduling/cycle yet.

@thymikee thymikee merged commit 0f6ed89 into master Sep 6, 2017
@thymikee thymikee deleted the fix-mappings branch September 6, 2017 13:48
sharikovvladislav added a commit to sharikovvladislav/jest-preset-angular that referenced this pull request Nov 28, 2017
* origin/master:
  Adds a warning about html transforms. (thymikee#94)
  Update README to include installation instructions. (thymikee#84)
  Add doctype to test environment (thymikee#78)
  v4.0.0
  v4.0.0 changelog
  Update changelog for master
  v4.0.0-alpha.1
  Use universal zone.js instead of node-only (thymikee#76)
  Add custom environment (thymikee#75)
  Add fakeAsync test
  v3.0.2
  Clarify AngularJS support
  More accurate moduleNameMapper regexps (thymikee#71)
  Update CHANGELOG.md
  v3.0.1
  Bump jest and ts-jest to v21 (thymikee#70)
  v3.0.0
  Tighten up module mappers; bump jest (thymikee#53)
  Add section to troubleshooting about JS files transpiling (thymikee#68)
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.

3 participants