kentcdodds / react-ava-workshop

:tiger: A workshop repository for testing React ⚛ with AVA :rocket: --> slides
http://kcd.im/react-ava
MIT License
190 stars 19 forks source link

Branch coverage is off somehow. Because of super? #12

Open im-martijn opened 8 years ago

im-martijn commented 8 years ago

Hi,

Great workshop!

I noticed that my test coverage is 100% on almost everything, but not for % Branch in Toggle.js and CustomerList.js. In Toggle.js I get 5/6 branches coverage, in CustomerList.js I get 3/4 branches coverage. I don't hink I did anything wrong, I also get these coverages when I switch to the master branch. It might be the nyc/istanbul version. I see there is an issue that I think is causing this.

How could I go about and fix this in your example files?

Thanks!
Martijn

kentcdodds commented 8 years ago

Hi! Actually, I recommend against using AVA these days. It has some serious perf issues. Instead, I recommend you use Jest (I have a jest version of this repo here: https://github.com/kentcdodds/react-jest-workshop). Learn more about Jest here: http://kcd.im/egghead-jest

If you want to try to fix this, I'm happy to accept a pull request. God luck!

im-martijn commented 8 years ago

Thanks! Will have a look at jest right away ;)

It might be good to put an update on the readme.md that indicates your current view against ava and the link to the jest workshop?