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

Cannot access class methods from instance() #23

Open
NicHaley opened this issue Jan 21, 2019 · 0 comments
Open

Cannot access class methods from instance() #23

NicHaley opened this issue Jan 21, 2019 · 0 comments

Comments

@NicHaley
Copy link

NicHaley commented Jan 21, 2019

I've been enjoying the adapter, but running into an issue when trying to test class methods on my components.

I have the following:
const enzymeWrapper = mount(<App {...props} />); expect(enzymeWrapper.instance().myMethod()).toBe("123");

But I get enzymeWrapper.instance(...).myMethod is not a function. Inspecting the output from enzymeWrapper.instance() I can see that my instance variables are available, but class methods are not.

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

No branches or pull requests

1 participant