Skip to content

Simple counter using React TypeScript with Unit Testing using Jest and Enzyme

Notifications You must be signed in to change notification settings

RayyanX95/counter-click-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple counter using React TypeScript with Unit Testing using Jest and Enzyme

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published