-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Error: Method “text” is meant to be run on 1 node. 0 found instead #2545
Comments
The code you provided has a syntax error; can you share the actual jsx being passed into mount? (i suggest avoiding over abstractions that hide away passing jsx directly into an enzyme wrapper, since they make tests much harder to understand and maintain) What does |
i cannot just paste whole .jsx file here but this is the only chunk of code i have added (the section part) and while debugging my test case is going in default case. the condition is not satisfied and hence it is going in default case. |
I understand, but it's pretty hard to make a reproducible test case without the entire component code, and the complete test code (including abstractions). |
Your environment
Test
API
Version
Adapter
I am getting this type of error while executing enzyme test case in React. Below is my test case. Can anyone please help.
**Below is the error:
Error: Method “text” is meant to be run on 1 node. 0 found instead.
at ReactWrapper.single (node_modules/enzyme/src/ReactWrapper.js:1168:13)
at ReactWrapper.text (node_modules/enzyme/src/ReactWrapper.js:629:17)**
section is present in .jsx file:
The text was updated successfully, but these errors were encountered: