Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.11 KB

README.md

File metadata and controls

40 lines (32 loc) · 1.11 KB

testing-react-workshop

WTF ?

  • Why testing ?
  • Let's create a simple test asserter
  • Install Jest
  • Test JS
  • Why react changed the idea of test
  • Install Enzyme
  • Configure Enzyme
  • Go over how to check for number of elements and stuff like that with enzyme
  • Check state and props with enzyme
  • Snapshot testing and the difference between shallow, mount and render
  • Snapshot testing

Online Stuff:

Create a simple test asserter:

Test JS:

Test React:

Test react with state and simulate clicks: