how to check the actual DOM node using react enzyme

后端 未结 6 490
孤街浪徒
孤街浪徒 2020-12-20 11:29

Is there a way to get the actual DOM node so I can the query it with the Dom api as opposed to being required to use enzyme\'s api, it\'s just for edge cases where for examp

6条回答
  •  情深已故
    2020-12-20 12:11

    If you want to print out whole DOM,

    const wrapper = shallow();
    console.log("DOM tree for humans", wrapper.text());
    

提交回复
热议问题