Introduction to Enzyme
Get an introduction to testing with React and how to create React projects from scratch.
We'll cover the following...
Testing React with Enzyme
JavaScript web development can be divided into two eras: pre-React and post-React. Pre-React was all chaos. Suppose you wanted to make a button-toggle a popup when clicked. You’d add code nowhere near the button markup to add an event listener for the button click. The event listener you’d write would directly alter the DOM to show or hide the popup. Code was scattered without rhyme or reason. Unit tests were almost unheard of.
Thankfully, we live in the age of React. Now individual pieces of the app can be isolated as components. The DOM tree they render is a pure function of ...