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 tests to all of our React components, by using JEST #92

Open
2 tasks
atherdon opened this issue Jul 27, 2018 · 3 comments
Open
2 tasks

add tests to all of our React components, by using JEST #92

atherdon opened this issue Jul 27, 2018 · 3 comments

Comments

@atherdon
Copy link
Member

atherdon commented Jul 27, 2018

@poojashukla10
At this folder we have all our major components for homepage: https://github.com/GroceriStar/homepage/tree/master/src/components

  • Add %component%.test.js file for each component and add simple tests for empty rendering
    I can provide an example if you wish.
  • Create simple tests for child components inside parent component

In order to do it - you need to fork this repo, apply your changes and open a pull request in order

@poojashukla10
Copy link

poojashukla10 commented Jul 29, 2018 via email

@atherdon
Copy link
Member Author

if you'll clone the project to your computer - and run the react project - then jest installed.

this is a begginer guide to jest testing: https://www.sitepoint.com/test-react-components-jest/

tell me if you need help with setting up local instance of nodejs and forking our project

@atherdon
Copy link
Member Author

this is a simple example of test, created with jest: https://github.com/GroceriStar/react-only-intern-23/blob/master/src/__tests__/Calender.test.js
basically it's checking if component can render without crashing(if component isset)

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