簡體   English   中英

react-testing-library cleanup在codesandbox中不起作用

[英]react-testing-library cleanup doesn't work in codesandbox

cleanup在codesandbox中不起作用,我將ReactDOM.render函數評論為有人建議在這里: https//github.com/CompuIves/codesandbox-client/issues/1525並且它可以工作,但是fireEvent不起作用。 反之亦然,當我不評論ReactDOM.render函數時, fireEvent工作並且cleanup沒有。

代碼: https//codesandbox.io/s/mqm2w49y1x

RTL在codesandbox中不能很好地工作。 而是在本地計算機上運行測試。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM