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

Fallback to regular require if module.parent.require is unavailable #834

Merged
merged 1 commit into from
Sep 19, 2017
Merged

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented Sep 8, 2017

Description

Some environments (like jest) don't implement it

Motivation and Context

I'd like to run tests with jest for an app that using marko.

Screenshots (if appropriate):

Checklist:

  • My code follows the code style of this project.
  • I have updated/added documentation affected by my changes.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Tests are failing for some reason, help is appreciated

Disclaimer: Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so.

Some environments (like jest) don't implement it
@SimenB
Copy link
Contributor Author

SimenB commented Sep 8, 2017

Comment from jest maintainer that they don't want to support module.parent: jestjs/jest#1657 (comment)

@patrick-steele-idem patrick-steele-idem merged commit 2afc986 into marko-js:master Sep 19, 2017
@patrick-steele-idem
Copy link
Contributor

Thanks! 👍

@SimenB SimenB deleted the parent-require branch September 19, 2017 17:37
patrick-steele-idem added a commit that referenced this pull request Sep 19, 2017
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