/jest-enzyme

enzyme and jest features

Primary LanguageJavaScript

This project was bootstrapped with Create React App.

What we do here

. set up a very simple React App with Jest and Enzyme . Used Enzyme .shallow() function to render a component . Tested that required DOM elements were rendered using .find() . Tested Enzyme using Enzyme setState() and State() . Used .simulate to interact with rendered elements (clicked button) . Tested the comp for updates after interaction . Create re-usable setup() and findByTestAttr() functions

Challenge

. Create a decrement setup for the app () (the counter can{t go below zero) use alert} . Create the unit test