haensl / js-session-testing

Resources for JS Session on testing React components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS Session: Testing

Testing React components.

In this JS Session we approach testing React Components. We address questions like

  • What to test?
  • How to test user interaction?
  • How to test interactions with other components?
  • How to test asynchronous interactions?

→ Slides

→ Testing debounced actions: filtering on key up

This example showcases filtering a tree of options based on user input. In order to not re-calculate the tree unneccessarily, we debounce tree recalculation by a certain time. Debouncing in this example means: "Only recalculate the tree when there was no keyup event within 250 milliseconds".

The example project was bootstrapped with Create React App. The usual npm install, npm start, npm test apply.

About

Resources for JS Session on testing React components.


Languages

Language:JavaScript 66.8%Language:HTML 20.1%Language:CSS 13.0%