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-react-native: Modal is not mocked #1739

Closed
ColCh opened this issue Sep 19, 2016 · 3 comments · Fixed by #1794
Closed

jest-react-native: Modal is not mocked #1739

ColCh opened this issue Sep 19, 2016 · 3 comments · Fixed by #1794

Comments

@ColCh
Copy link
Contributor

ColCh commented Sep 19, 2016

Modal component is not mocked:

  ● Modal › iOS › should render AlertModal

    TypeError: Cannot read property '_tag' of null

      at ReactNativeBaseComponent.Mixin.mountComponent (node_modules/react/lib/ReactNativeBaseComponent.js:181:45)
      at Object.ReactReconciler.mountComponent (node_modules/react/lib/ReactReconciler.js:47:35)
      at ReactCompositeComponentMixin.performInitialMount (node_modules/react/lib/ReactCompositeComponent.js:385:34)
      at ReactCompositeComponentMixin.mountComponent (node_modules/react/lib/ReactCompositeComponent.js:260:21)
      at Object.ReactReconciler.mountComponent (node_modules/react/lib/ReactReconciler.js:47:35)
      at ReactCompositeComponentMixin.performInitialMount (node_modules/react/lib/ReactCompositeComponent.js:385:34)
      at ReactCompositeComponentMixin.mountComponent (node_modules/react/lib/ReactCompositeComponent.js:260:21)
      at Object.ReactReconciler.mountComponent (node_modules/react/lib/ReactReconciler.js:47:35)
      at ReactCompositeComponentMixin.performInitialMount (node_modules/react/lib/ReactCompositeComponent.js:385:34)
      at ReactCompositeComponentMixin.mountComponent (node_modules/react/lib/ReactCompositeComponent.js:260:21)

Of course, when you mock it manually ( see #1738 ), it starts to work.

@ColCh ColCh changed the title jest-react-native jest-react-native: Modal is not mocked Sep 19, 2016
@cpojer
Copy link
Member

cpojer commented Sep 20, 2016

Would you mind sending us a PR with a mock for Modal?

@ColCh
Copy link
Contributor Author

ColCh commented Sep 20, 2016

yes, for sure. I just wanted to store isssue like TODO item

ColCh added a commit to ColCh/jest that referenced this issue Sep 25, 2016
@ColCh ColCh mentioned this issue Sep 25, 2016
cpojer pushed a commit that referenced this issue Sep 26, 2016
mthmulders pushed a commit to mthmulders/jest that referenced this issue Oct 10, 2016
tushardhole pushed a commit to tushardhole/jest that referenced this issue Aug 21, 2017
@github-actions
Copy link

This issue 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 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants