gulpfile.js is not generating the code coverage on specific file

If you are facing the issue with running thew gulpfile.js and it shows 100% always, not specific to the file then you need to some little bit modification in your gulpfile.

Add includeUntested: true to fix the issue in your gulp task definition.

.pipe(istanbul({includeUntested: true}))

.pipe(istanbul.hookRequire())

.on('finish', function () {

gulp.src(['./tests/LogToLogglyTest.js'])

.pipe(mocha())

  .pipe(istanbul.writeReports())