Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for unit testing components #196

Open
doug-lessen opened this issue Aug 28, 2021 · 2 comments
Open

Add support for unit testing components #196

doug-lessen opened this issue Aug 28, 2021 · 2 comments

Comments

@doug-lessen
Copy link

Were you ever able to get unit tests configured for this setup? It is something I've been experimenting with on this repo but haven't been successful yet. Have only spent about a day looking into it.

@Naturalclar
Copy link
Owner

@doug-lessen what are you trying to accomplish with the unit test?
this library implements a small design system, and unit tests required for that I believe is snapshot testing, which is covered in this repository via storybook and storycap.

@doug-lessen
Copy link
Author

doug-lessen commented Sep 3, 2021

@doug-lessen what are you trying to accomplish with the unit test?
this library implements a small design system, and unit tests required for that I believe is snapshot testing, which is covered in this repository via storybook and storycap.

@Naturalclar Wow thank you for the quick reply on this. Didn't think I would get a response. Firstly I would like to say that I am in love with this repository. The one thing I wish it supported was Jest testing of functional components out of the box. For example, I have a use case where I require at least one unit test per component where the unit test asserts that when all of the component's props are null or undefined that the component will render without errors.

Are you suggesting that this is all possible through the Storybook and Storycap interfaces? If so, how would one configure that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants