{"action":"created","issue":{"url":"https://api.github.com/repos/SBoudrias/gulp-istanbul/issues/37","labels_url":"https://api.github.com/repos/SBoudrias/gulp-istanbul/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/SBoudrias/gulp-istanbul/issues/37/comments","events_url":"https://api.github.com/repos/SBoudrias/gulp-istanbul/issues/37/events","html_url":"https://github.com/SBoudrias/gulp-istanbul/issues/37","id":42668868,"number":37,"title":"100% Coverage of nothing: app files not passing through to istanbul?","user":{"login":"atomantic","id":70015,"avatar_url":"https://avatars.githubusercontent.com/u/70015?v=3","gravatar_id":"","url":"https://api.github.com/users/atomantic","html_url":"https://github.com/atomantic","followers_url":"https://api.github.com/users/atomantic/followers","following_url":"https://api.github.com/users/atomantic/following{/other_user}","gists_url":"https://api.github.com/users/atomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/atomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomantic/subscriptions","organizations_url":"https://api.github.com/users/atomantic/orgs","repos_url":"https://api.github.com/users/atomantic/repos","events_url":"https://api.github.com/users/atomantic/events{/privacy}","received_events_url":"https://api.github.com/users/atomantic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2014-09-12T20:45:39Z","updated_at":"2015-10-30T11:57:21Z","closed_at":"2014-09-17T03:27:50Z","body":"\r\n```\r\ngulp.task('test', function (cb) {\r\n    gulp.src(['./*.js'])\r\n      .pipe(istanbul()) // Covering files\r\n      .on('finish', function () {\r\n        gulp.src(['test/*.js'])\r\n        .pipe(lab('-v -C -l -m 0'))\r\n        .pipe(istanbul.writeReports()) // Creating the reports after tests runned\r\n        .on('end', cb);\r\n      });\r\n});\r\n```\r\n\r\nresults in this:\r\n```\r\n----------|-----------|-----------|-----------|-----------|\r\nFile      |   % Stmts |% Branches |   % Funcs |   % Lines |\r\n----------|-----------|-----------|-----------|-----------|\r\n----------|-----------|-----------|-----------|-----------|\r\nAll files |       100 |       100 |       100 |       100 |\r\n----------|-----------|-----------|-----------|-----------|\r\n\r\n\r\n=============================== Coverage summary ===============================\r\nStatements   : 100% ( 0/0 )\r\nBranches     : 100% ( 0/0 )\r\nFunctions    : 100% ( 0/0 )\r\nLines        : 100% ( 0/0 )\r\n================================================================================\r\n```\r\n\r\nThe output lcov.info is an empty file.\r\ncoverage-final.json contains and empty `{}`"},"comment":{"url":"https://api.github.com/repos/SBoudrias/gulp-istanbul/issues/comments/152505766","html_url":"https://github.com/SBoudrias/gulp-istanbul/issues/37#issuecomment-152505766","issue_url":"https://api.github.com/repos/SBoudrias/gulp-istanbul/issues/37","id":152505766,"user":{"login":"tandrewnichols","id":2755760,"avatar_url":"https://avatars.githubusercontent.com/u/2755760?v=3","gravatar_id":"","url":"https://api.github.com/users/tandrewnichols","html_url":"https://github.com/tandrewnichols","followers_url":"https://api.github.com/users/tandrewnichols/followers","following_url":"https://api.github.com/users/tandrewnichols/following{/other_user}","gists_url":"https://api.github.com/users/tandrewnichols/gists{/gist_id}","starred_url":"https://api.github.com/users/tandrewnichols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tandrewnichols/subscriptions","organizations_url":"https://api.github.com/users/tandrewnichols/orgs","repos_url":"https://api.github.com/users/tandrewnichols/repos","events_url":"https://api.github.com/users/tandrewnichols/events{/privacy}","received_events_url":"https://api.github.com/users/tandrewnichols/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T11:57:21Z","updated_at":"2015-10-30T11:57:21Z","body":"I ended up including _both_ gulp-spawn-mocha and gulp-mocha in my test suite. I use gulp-spawn-mocha for integration tests and for unit tests not run under coverage, and I use gulp-mocha for running unit tests under coverage. This actually works quite well, as they both have the same method signature, so I just swap the \"require\" and leave everything else the same."}}