aweary/react-perimeter

Add test suite

Aperta

#5 aperta il 17 mar 2017

 (4 commenti) (2 reazioni) (0 assegnatari)JavaScript (27 fork)github user discovery
good first bughelp wanted

Metriche repository

Star
 (1042 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

It's probably hard to test the actual core feature of react-perimeter , but there are a few things we can definitely test:

  • correctly exports the React component
  • renders children
  • attaches ref correctly with render callbacks
  • registers event listeners on mount
  • removes event listeners on unmount
  • removes event listeners after onBreach is called if once is true
  • more stuff

I'd like to use jest and enzyme for this.

Guida contributor