Background
I am trying to learn how to use the React Shallow Rendering TestUtil and had the tests passing until I added an onClick
event handler to both; It seems that there must be some difference with the Accordion.toggle
function I am trying to use in Accordion.test.js
vs this.toggle
in Accordian.js
...but I can't figure it out.
Question
How can I get the two highlighted tests in Accordian.test.js
to pass?
Steps to reproduce
- Clone http://ift.tt/1imBOoY
npm install
npm run dev
- see that component is working when you click "Lorem Ipsum"npm run test:watch
- see that tests are failing
Aucun commentaire:
Enregistrer un commentaire