I am trying to wrap my head around testing Flux and React applications using Jest.
I started using Scotch.io tutorial as my starting point and will be creating a full test suite to gain knowledge in how to structure my first real react and flux app.
You can find my code on github to see where I am at.
The test that does not run is FluxProduct-test.jsx
It comes back with "TypeError: Cannot read property 'calls' of undefined" on line 100.
When I log out FluxProduct it seems that it is not being automocked, which is the reason mock is undefined and accessing the calls property is throwing the error.
fyi: Jest requires Node 0.10, does not run on 0.12
Aucun commentaire:
Enregistrer un commentaire