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 jest & rtl #358

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

SergiuPintilei
Copy link
Contributor

Add Jest and RTL following the official guide.

Also added 2 examples (no strong opinion about the folder structure).

https://nextjs.org/docs/testing#setting-up-jest-with-the-rust-compiler

Do we want dedicated tests folder or add them inside each component's folder?

@cleferman
Copy link
Collaborator

I would go with a tests folder inside each component's folder. Easier to find the tests through the folder structure and there are less files in the component's folder.

Could you also update the generate_component/index.js so it automatically adds the tests folder along with the Component.test.tsx file?

@SergiuPintilei
Copy link
Contributor Author

I would go with a tests folder inside each component's folder. Easier to find the tests through the folder structure and there are less files in the component's folder.

Could you also update the generate_component/index.js so it automatically adds the tests folder along with the Component.test.tsx file?

done

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

Successfully merging this pull request may close these issues.

2 participants