alexjoverm / typescript-library-starter

Starter kit with zero-config for building a library in TypeScript, featuring RollupJS, Jest, Prettier, TSLint, Semantic Release, and more!
MIT License
4.37k stars 493 forks source link

Jest coverage for all folders #293

Open robinxb opened 5 years ago

robinxb commented 5 years ago

Hi, Instead of using

"collectCoverageFrom": [
      "src/*.{js,ts}"
    ]

Which only coverage the files under src, not including files in subfolders.

I suggest that change it into:

    "collectCoverageFrom": [
      "src/**/*.{js,ts}"
    ]

I took sometime to figure this out since I'm new to Jest. Hope this will help others like me.

I've created a PR if you agreed with me 😃