I am using jest to test my component with snapshot testing. When I check a component with a smaller component ( that componet in a library ), so, it found that two id generated different of each and test fail, I want to know how to fix it. example: My component to test: <Loading><Loading>
In Loading component: render(){ } Spinner is a component in "react-spinner-material", so i don't know how its id generated. When i run test, it shows fails:
<div className="spinner" id="spinner_1545879774934" id="spinner_1545884872602"
Aucun commentaire:
Enregistrer un commentaire