Skip to content

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