javascripttestingcode-coveragequnitnyc

Why is Istanbul with Qunit able to see my source files, but does not measure their coverage?


I’m creating some modules to work with three-js and since that project uses Qunit, I’m sticking with that.

Qunit is running my test scripts correctly. I read a couple quick tutorials on coverage testing with qunit, and Istanbul (nyc) seems to be recommended. I added "nyc": "*", to my devDependencies, and changed my test script to be "test": "nyc qunit". I now see a coverage report, but nyc is not measuring any coverage, and not listing any files. If I change the test script to "test": "nyc --all qunit" the report shows that it now does see all my source files, but says all the lines are uncovered. Is there another step I need to ensure nyc can measure coverage?


Solution

  • I switched to the drop-in replacement bcoe/c8 and it started to work. Nyc seems to no longer be in development.