You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
Hi !
I have to test a library of pure presentational components. In general, the components receive props like: isDisabled, isRounded... which only shows/hide html elements or add some class names.
For this reason, I think that the best approach to test this is using snapshots.
Example component:
As additional question, ¿should I add the styles to the snapshots too?
My components library is using scss styles, so if true, ¿which library should I use to integrate into the snapshotSerializers jest config?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi !
I have to test a library of pure presentational components. In general, the components receive props like:
isDisabled
,isRounded
... which only shows/hide html elements or add some class names.For this reason, I think that the best approach to test this is using snapshots.
Example component:
But my main question is:
¿Should I create a snapshot test per each prop combination?
¿Or should I create an only one general snapshot test sending the most props possible?
<Button isDisabled={true} isRounded={true} isSlim={true} icon="ball" /> (snapshot 1)
Thanks! :)
The text was updated successfully, but these errors were encountered: