https://github.com/rayyanx95/counter-click-ts
Simple counter using React TypeScript with Unit Testing using Jest and Enzyme
https://github.com/rayyanx95/counter-click-ts
enzyme javascript jest react reacttypescript typescript
Last synced: 3 months ago
JSON representation
Simple counter using React TypeScript with Unit Testing using Jest and Enzyme
- Host: GitHub
- URL: https://github.com/rayyanx95/counter-click-ts
- Owner: RayyanX95
- Created: 2022-03-18T15:27:34.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-18T15:32:36.000Z (over 4 years ago)
- Last Synced: 2025-06-26T00:04:38.338Z (about 1 year ago)
- Topics: enzyme, javascript, jest, react, reacttypescript, typescript
- Language: TypeScript
- Homepage: https://counter-click-ts.onrender.com/
- Size: 155 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Counter Click TS
Simple counter using React TypeScript with Unit Testing using Jest and Enzyme
## Challenges
One of the testing of this simple app was to apply the following scenario:
### 1. Decrement button
- Create a new button that subtracts 1 from the counter
### 2. No count below 0
- Don't let the counter go below zero.
- if the counter is at 0 and the decrement button is clicked:
- don't decrement the counter
- display an error message saying the counter can't go below zero
### 3. Remove error when increment button is clicked
- If error is showing and increment button is clicked, clear the error.