jeudi 23 avril 2020

Change State of component before run snapshot test

Here I conditional render based on my state variable this.state.isLoading to use it check if data is fetched and loaded or not.. enter image description here

When I do the snapshot test for the component, so each time it will save snapshot for only the LoadingSnipper Component and not enter to second part, so I need to change the state before run snapshot how to do that ?

Aucun commentaire:

Enregistrer un commentaire