verekia / js-stack-from-scratch

🛠️⚡ Step-by-step tutorial to build a modern JavaScript stack.
MIT License
20.05k stars 1.99k forks source link

Added Jest coverage configuration #179

Open sbs863 opened 7 years ago

sbs863 commented 7 years ago

If the goal of enabling coverage is to see the parts of the codebase that lack testing then we need to configure jest to do this. Adding the --coverage flag in the test script will display the coverage table, however it will only show files for which tests have been written. I added in a jest config script that monitors any js file in the src directory or it's sub-directories.