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

TypeError: inst.render is not a function when testing stateless functional components #642

Closed
udivankin opened this issue Dec 10, 2015 · 2 comments

Comments

@udivankin
Copy link

Functional component which looks like this

function DateTime({ dateTime }) {
  return <span>{(dateTime || new Date()).toLocaleDateString(currentLocale)}</span>;
}

being included to any conventional component causes this component's test failing with

TypeError: inst.render is not a function
        at ReactCompositeComponentMixin._renderValidatedComponentWithoutOwnerOrContext (node_modules/react/lib/ReactCompositeComponent.js:587:34)
        at ReactCompositeComponentMixin._renderValidatedComponent (node_modules/react/lib/ReactCompositeComponent.js:607:32)
        at ...

React 0.14.3, JEST 0.8.0, npm 3.5.2, node 5.2

Any suggestions on how to get rid of this?

@udivankin
Copy link
Author

moved to react repo

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant