aweary/react-perimeter

Add test suite

Open

#5 aberto em 17 de mar. de 2017

Ver no GitHub
 (4 comments) (2 reactions) (0 assignees)JavaScript (27 forks)github user discovery
good first bughelp wanted

Métricas do repositório

Stars
 (1.042 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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.

Guia do colaborador