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>,
}