I have project Excellent.js setup for automatic testing with jest and puppeteer, which successfully runs all the tests, which can be seen on Travis CI.
But after a lot of configuration tweaks I have been unable to make it report correct coverage. No matter what tests are executed, the coverage does not reflect it at all.
The library contains only a single JavaScript file excellent.js
, and my jest.config.js was set up as instructed for coverage:
module.exports = {
collectCoverage: true,
collectCoverageFrom: [
'src/excellent.js'
],
testURL: 'http://localhost/',
setupFiles: [
'./src/excellent.js'
]
};
Here're all the tests, which all pass if you do first npm install
, and then npm test
.
So what am I missing? Why can't I get the coverage reported correctly?