I'm developing Test on React using enzyme, and I want to reach the value of this "td"
<td className="myCell" key={String(x) + String(y)}>{value}</td>
but using this code :
ArrayAreaComponent.find("td").first().render()
I recive:
initialize {
'0': {
type: 'tag',
name: 'td',
namespace: 'http://www.w3.org/1999/xhtml',
attribs: [Object: null prototype] { class: 'myCell' },
'x-attribsNamespace': [Object: null prototype] { class: undefined },
'x-attribsPrefix': [Object: null prototype] { class: undefined },
children: [ [Object] ],
parent: null,
prev: null,
next: null,
root: {
type: 'root',
name: 'root',
namespace: 'http://www.w3.org/1999/xhtml',
attribs: [Object: null prototype] {},
'x-attribsNamespace': [Object: null prototype] {},
'x-attribsPrefix': [Object: null prototype] {},
children: [Array],
parent: null,
prev: null,
next: null
}
},
options: {
withDomLvl1: true,
normalizeWhitespace: false,
xml: false,
decodeEntities: true
},
length: 1,
_root: [Circular]
}
How can I extract the value from this object? and where can I find more information about this kind of object?
Aucun commentaire:
Enregistrer un commentaire