enzymejs / enzyme

JavaScript Testing utilities for React
https://enzymejs.github.io/enzyme/
MIT License
19.96k stars 2.01k forks source link

Method “props” is only meant to be run on a single node. 0 found instead. #2566

Open Pinturaj opened 2 years ago

Pinturaj commented 2 years ago

Method “props” is meant to be run on 1 node. 0 found instead.

 const commentTextInput = findByTestAttr(wrapper, 'clockings-add-comment');  

console.log("testing1:"+commentTextInput.props().spellcheck)

Thanks for reporting an issue to us! We're glad you are using and invested in Enzyme. Before submitting, please read over our commonly reported issues to prevent duplicates!

All common issues

Notoriously common issues

If you haven't found any duplicated issues, please report it with your environment!

Current behavior

Expected behavior

Your environment

API

Version

library version
enzyme
react
react-dom
react-test-renderer
adapter (below)

Adapter

ljharb commented 2 years ago

@Pinturaj please fill out the entire issue template; it's there for a reason.