react-ava-workshop icon indicating copy to clipboard operation
react-ava-workshop copied to clipboard

Branch coverage is off somehow. Because of super?

Open im-martijn opened this issue 9 years ago • 2 comments

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

im-martijn avatar Oct 26 '16 14:10 im-martijn

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!

kentcdodds avatar Oct 26 '16 14:10 kentcdodds

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?

im-martijn avatar Oct 28 '16 11:10 im-martijn