DEV Community

Discussion on: Jest code coverage report explained

Collapse
 
diass_le profile image
Leonardo Dias

Nice post!

I really enjoy Jest coverage, but... My problem's with testing private functions/ not exported functions using libs like rewire to get these functions from the module/class. We can test well and Jest assertions work fine, but coverage not. The Jest Coverage just ignore these tests :/

Collapse
 
emma profile image
Emma Goto 🍙

Interesting! I hadn't heard of rewire before. Looks like there's an open issue on their repo for jest coverage but no solution yet 😓