简体   繁体   中英

react-testing-library cleanup doesn't work in codesandbox

cleanup doesn't work in codesandbox and I comment the ReactDOM.render function as someone suggesting to in here: https://github.com/CompuIves/codesandbox-client/issues/1525 and it works, but fireEvent doesn't work. Vice versa, when I don't comment the ReactDOM.render function, fireEvent works and cleanup doesn't.

code: https://codesandbox.io/s/mqm2w49y1x

RTL doesn't work well in codesandbox. Run your tests in your local machine instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM