This small repo is to demonstrate how testing/TDD works in React project.
You can read detailed instructions here: https://yozibak.com/tdd-test-driven-development-basics-tutorial-with-typescriptreact
- Write sumArr() function that returns the sum of incoming array of int.
- Test sumArr() with jest.
- Change implementation of sumArr(), assuring result running test.
-> git checkout ex1/answer
- Write test to ensure page title is shown
- Write test to ensure current number of reviews is shown
- Write test to ensure form submission is properly reflecting form values
-> git checkout ex2/answer
Implement validation on form submit, but test first.
Form Validation Requirements
- title < 50 characters
- score 0 ~ 100 pts
- comment < 400 characters
-> git checkout ex3/answer
Show average review score on top of questionnaire form.
-> git checkout ex4/answer