0
エンハンサー浅いレンダラーに問題があります。私のwrapper.root.node
は単純なdiv要素でもnullを返す。エンハンサー浅いレンダラーがnullノードエレメントを返します
const wrapper = shallow(
<div>asd</div>
);
ここにShallowWrapperオブジェクトがあります。ノード要素はnullですが、未レンダリングプロパティには通常のレンダリングオブジェクトが含まれます。何故ですか ?
ShallowWrapper {
"complexSelector": ComplexSelector {
"buildPredicate": [Function],
"childrenOfNode": [Function],
"findWhereUnwrapped": [Function],
},
"length": 1,
"node": null,
"nodes": Array [
null,
],
"options": Object {},
"renderer": ReactShallowRenderer {
"_instance": null,
"getRenderOutput": [Function],
"render": [Function],
},
"root": [Circular],
"unrendered": <div>
asd
</div>,
}