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

added error checking for state, setState, context, instance methods on ShallowWrapper #373

Merged
merged 3 commits into from
May 9, 2016

Conversation

nfcampos
Copy link
Collaborator

@nfcampos nfcampos commented May 9, 2016

  • .instance was missing the root check even though it was mentioned in the description above.
  • state and setState don't make sense for functional components so they now throw if called on a functional component (error message like the root one)
  • also added the existing error checking of setContext to context

@lelandrichardson
Copy link
Collaborator

Awesome!

@lelandrichardson lelandrichardson merged commit 45ee4cf into enzymejs:master May 9, 2016
@nfcampos nfcampos deleted the errs branch May 9, 2016 22:31
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