Logo Awesome React

Awesome React

JSDom & Enzyme: Different Test Styles for React Apps

  • Details
As the JavaScript landscape has been rapidly changing and teams adopt various libraries like React, we need to interrogate our testing patterns and paradigms. Dan wants to put React unit tests under the microscope and talk about how we can extract the more value with tools like JSDom and Enzyme. This presentation will compare different ways to write unit tests for React applications and why we write tests at all.

CONTENTS

0:05 - Intro
1:01 - What is the value of a test?
1:25 - Living documentation for our code
2:19 - Confidence changing code as we scale
3:26 - JSDom & Enzyme
4:22 - Enzyme
4:58 - Let’s test an app
5:02 - Login App - UI mock up
9:12 - Characteristics of these tests
10:47 - Another test
14:15 - Some concerns
16:12 - How do these tests fit?
19:27 - Why are you writing that test?
19:38 - Questions


RESOURCES

JSDom
https://github.com/tmpvar/jsdom

Enzyme
https://github.com/airbnb/enzyme