{"action":"created","comment":{"url":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/comments/46086933","id":46086933,"diff_hunk":"@@ -28,22 +28,42 @@ var gulpTape = function(opts) {\n \n   var flush = function(cb) {\n     try {\n-      tape.createStream(tapeOpts).pipe(reporter).pipe(outputStream);\n+      var tapeOutput = tape.createStream(tapeOpts);","path":"index.js","position":5,"original_position":5,"commit_id":"ff56264c2292bf037a0b608ea8289f882feaf6b5","original_commit_id":"ff56264c2292bf037a0b608ea8289f882feaf6b5","user":{"login":"yuanqing","id":3170842,"avatar_url":"https://avatars.githubusercontent.com/u/3170842?v=3","gravatar_id":"","url":"https://api.github.com/users/yuanqing","html_url":"https://github.com/yuanqing","followers_url":"https://api.github.com/users/yuanqing/followers","following_url":"https://api.github.com/users/yuanqing/following{/other_user}","gists_url":"https://api.github.com/users/yuanqing/gists{/gist_id}","starred_url":"https://api.github.com/users/yuanqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuanqing/subscriptions","organizations_url":"https://api.github.com/users/yuanqing/orgs","repos_url":"https://api.github.com/users/yuanqing/repos","events_url":"https://api.github.com/users/yuanqing/events{/privacy}","received_events_url":"https://api.github.com/users/yuanqing/received_events","type":"User","site_admin":false},"body":"Prefer `tapeStream`","created_at":"2015-11-29T02:33:39Z","updated_at":"2015-11-29T02:33:39Z","html_url":"https://github.com/yuanqing/gulp-tape/pull/11#discussion_r46086933","pull_request_url":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/comments/46086933"},"html":{"href":"https://github.com/yuanqing/gulp-tape/pull/11#discussion_r46086933"},"pull_request":{"href":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/11","id":52029988,"html_url":"https://github.com/yuanqing/gulp-tape/pull/11","diff_url":"https://github.com/yuanqing/gulp-tape/pull/11.diff","patch_url":"https://github.com/yuanqing/gulp-tape/pull/11.patch","issue_url":"https://api.github.com/repos/yuanqing/gulp-tape/issues/11","number":11,"state":"open","locked":false,"title":"End the stream created when done","user":{"login":"zoubin","id":2097644,"avatar_url":"https://avatars.githubusercontent.com/u/2097644?v=3","gravatar_id":"","url":"https://api.github.com/users/zoubin","html_url":"https://github.com/zoubin","followers_url":"https://api.github.com/users/zoubin/followers","following_url":"https://api.github.com/users/zoubin/following{/other_user}","gists_url":"https://api.github.com/users/zoubin/gists{/gist_id}","starred_url":"https://api.github.com/users/zoubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoubin/subscriptions","organizations_url":"https://api.github.com/users/zoubin/orgs","repos_url":"https://api.github.com/users/zoubin/repos","events_url":"https://api.github.com/users/zoubin/events{/privacy}","received_events_url":"https://api.github.com/users/zoubin/received_events","type":"User","site_admin":false},"body":"Fix #10 and #8 \r\n\r\nThe reason why the test task never ends in watch mode, is that `tape.getHarness()._tests.length` increases each time the test task finishes. So from the second time, it never ends.\r\n\r\nI end the tape output when tests are done, so that the reporter output will come before the gulp task messages and they won't mess.\r\nHowever, the reporter will never receive messages created when `results.close` called. So I push them manually. \r\n\r\nI'm not quite sure whether we should end the tape output and push the extra messages.\r\nWhat do you say? @yuanqing ","created_at":"2015-11-28T00:43:47Z","updated_at":"2015-11-29T02:33:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f11795a641dd950df4e6e2a4a856403a63199301","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/11/commits","review_comments_url":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/11/comments","review_comment_url":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yuanqing/gulp-tape/issues/11/comments","statuses_url":"https://api.github.com/repos/yuanqing/gulp-tape/statuses/ff56264c2292bf037a0b608ea8289f882feaf6b5","head":{"label":"zoubin:end-the-stream-created-when-done","ref":"end-the-stream-created-when-done","sha":"ff56264c2292bf037a0b608ea8289f882feaf6b5","user":{"login":"zoubin","id":2097644,"avatar_url":"https://avatars.githubusercontent.com/u/2097644?v=3","gravatar_id":"","url":"https://api.github.com/users/zoubin","html_url":"https://github.com/zoubin","followers_url":"https://api.github.com/users/zoubin/followers","following_url":"https://api.github.com/users/zoubin/following{/other_user}","gists_url":"https://api.github.com/users/zoubin/gists{/gist_id}","starred_url":"https://api.github.com/users/zoubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoubin/subscriptions","organizations_url":"https://api.github.com/users/zoubin/orgs","repos_url":"https://api.github.com/users/zoubin/repos","events_url":"https://api.github.com/users/zoubin/events{/privacy}","received_events_url":"https://api.github.com/users/zoubin/received_events","type":"User","site_admin":false},"repo":{"id":43725790,"name":"gulp-tape","full_name":"zoubin/gulp-tape","owner":{"login":"zoubin","id":2097644,"avatar_url":"https://avatars.githubusercontent.com/u/2097644?v=3","gravatar_id":"","url":"https://api.github.com/users/zoubin","html_url":"https://github.com/zoubin","followers_url":"https://api.github.com/users/zoubin/followers","following_url":"https://api.github.com/users/zoubin/following{/other_user}","gists_url":"https://api.github.com/users/zoubin/gists{/gist_id}","starred_url":"https://api.github.com/users/zoubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoubin/subscriptions","organizations_url":"https://api.github.com/users/zoubin/orgs","repos_url":"https://api.github.com/users/zoubin/repos","events_url":"https://api.github.com/users/zoubin/events{/privacy}","received_events_url":"https://api.github.com/users/zoubin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zoubin/gulp-tape","description":"Run Tape tests in Gulp.","fork":true,"url":"https://api.github.com/repos/zoubin/gulp-tape","forks_url":"https://api.github.com/repos/zoubin/gulp-tape/forks","keys_url":"https://api.github.com/repos/zoubin/gulp-tape/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zoubin/gulp-tape/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zoubin/gulp-tape/teams","hooks_url":"https://api.github.com/repos/zoubin/gulp-tape/hooks","issue_events_url":"https://api.github.com/repos/zoubin/gulp-tape/issues/events{/number}","events_url":"https://api.github.com/repos/zoubin/gulp-tape/events","assignees_url":"https://api.github.com/repos/zoubin/gulp-tape/assignees{/user}","branches_url":"https://api.github.com/repos/zoubin/gulp-tape/branches{/branch}","tags_url":"https://api.github.com/repos/zoubin/gulp-tape/tags","blobs_url":"https://api.github.com/repos/zoubin/gulp-tape/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zoubin/gulp-tape/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zoubin/gulp-tape/git/refs{/sha}","trees_url":"https://api.github.com/repos/zoubin/gulp-tape/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zoubin/gulp-tape/statuses/{sha}","languages_url":"https://api.github.com/repos/zoubin/gulp-tape/languages","stargazers_url":"https://api.github.com/repos/zoubin/gulp-tape/stargazers","contributors_url":"https://api.github.com/repos/zoubin/gulp-tape/contributors","subscribers_url":"https://api.github.com/repos/zoubin/gulp-tape/subscribers","subscription_url":"https://api.github.com/repos/zoubin/gulp-tape/subscription","commits_url":"https://api.github.com/repos/zoubin/gulp-tape/commits{/sha}","git_commits_url":"https://api.github.com/repos/zoubin/gulp-tape/git/commits{/sha}","comments_url":"https://api.github.com/repos/zoubin/gulp-tape/comments{/number}","issue_comment_url":"https://api.github.com/repos/zoubin/gulp-tape/issues/comments{/number}","contents_url":"https://api.github.com/repos/zoubin/gulp-tape/contents/{+path}","compare_url":"https://api.github.com/repos/zoubin/gulp-tape/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zoubin/gulp-tape/merges","archive_url":"https://api.github.com/repos/zoubin/gulp-tape/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zoubin/gulp-tape/downloads","issues_url":"https://api.github.com/repos/zoubin/gulp-tape/issues{/number}","pulls_url":"https://api.github.com/repos/zoubin/gulp-tape/pulls{/number}","milestones_url":"https://api.github.com/repos/zoubin/gulp-tape/milestones{/number}","notifications_url":"https://api.github.com/repos/zoubin/gulp-tape/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zoubin/gulp-tape/labels{/name}","releases_url":"https://api.github.com/repos/zoubin/gulp-tape/releases{/id}","created_at":"2015-10-06T02:25:34Z","updated_at":"2015-10-06T02:25:35Z","pushed_at":"2015-11-28T14:41:29Z","git_url":"git://github.com/zoubin/gulp-tape.git","ssh_url":"git@github.com:zoubin/gulp-tape.git","clone_url":"https://github.com/zoubin/gulp-tape.git","svn_url":"https://github.com/zoubin/gulp-tape","homepage":"","size":18,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yuanqing:master","ref":"master","sha":"cd0c466c427ffae2abd19b2ae1f375db0696c526","user":{"login":"yuanqing","id":3170842,"avatar_url":"https://avatars.githubusercontent.com/u/3170842?v=3","gravatar_id":"","url":"https://api.github.com/users/yuanqing","html_url":"https://github.com/yuanqing","followers_url":"https://api.github.com/users/yuanqing/followers","following_url":"https://api.github.com/users/yuanqing/following{/other_user}","gists_url":"https://api.github.com/users/yuanqing/gists{/gist_id}","starred_url":"https://api.github.com/users/yuanqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuanqing/subscriptions","organizations_url":"https://api.github.com/users/yuanqing/orgs","repos_url":"https://api.github.com/users/yuanqing/repos","events_url":"https://api.github.com/users/yuanqing/events{/privacy}","received_events_url":"https://api.github.com/users/yuanqing/received_events","type":"User","site_admin":false},"repo":{"id":38570729,"name":"gulp-tape","full_name":"yuanqing/gulp-tape","owner":{"login":"yuanqing","id":3170842,"avatar_url":"https://avatars.githubusercontent.com/u/3170842?v=3","gravatar_id":"","url":"https://api.github.com/users/yuanqing","html_url":"https://github.com/yuanqing","followers_url":"https://api.github.com/users/yuanqing/followers","following_url":"https://api.github.com/users/yuanqing/following{/other_user}","gists_url":"https://api.github.com/users/yuanqing/gists{/gist_id}","starred_url":"https://api.github.com/users/yuanqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuanqing/subscriptions","organizations_url":"https://api.github.com/users/yuanqing/orgs","repos_url":"https://api.github.com/users/yuanqing/repos","events_url":"https://api.github.com/users/yuanqing/events{/privacy}","received_events_url":"https://api.github.com/users/yuanqing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuanqing/gulp-tape","description":"Run Tape tests in Gulp.","fork":false,"url":"https://api.github.com/repos/yuanqing/gulp-tape","forks_url":"https://api.github.com/repos/yuanqing/gulp-tape/forks","keys_url":"https://api.github.com/repos/yuanqing/gulp-tape/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuanqing/gulp-tape/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuanqing/gulp-tape/teams","hooks_url":"https://api.github.com/repos/yuanqing/gulp-tape/hooks","issue_events_url":"https://api.github.com/repos/yuanqing/gulp-tape/issues/events{/number}","events_url":"https://api.github.com/repos/yuanqing/gulp-tape/events","assignees_url":"https://api.github.com/repos/yuanqing/gulp-tape/assignees{/user}","branches_url":"https://api.github.com/repos/yuanqing/gulp-tape/branches{/branch}","tags_url":"https://api.github.com/repos/yuanqing/gulp-tape/tags","blobs_url":"https://api.github.com/repos/yuanqing/gulp-tape/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuanqing/gulp-tape/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuanqing/gulp-tape/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuanqing/gulp-tape/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuanqing/gulp-tape/statuses/{sha}","languages_url":"https://api.github.com/repos/yuanqing/gulp-tape/languages","stargazers_url":"https://api.github.com/repos/yuanqing/gulp-tape/stargazers","contributors_url":"https://api.github.com/repos/yuanqing/gulp-tape/contributors","subscribers_url":"https://api.github.com/repos/yuanqing/gulp-tape/subscribers","subscription_url":"https://api.github.com/repos/yuanqing/gulp-tape/subscription","commits_url":"https://api.github.com/repos/yuanqing/gulp-tape/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuanqing/gulp-tape/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuanqing/gulp-tape/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuanqing/gulp-tape/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuanqing/gulp-tape/contents/{+path}","compare_url":"https://api.github.com/repos/yuanqing/gulp-tape/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuanqing/gulp-tape/merges","archive_url":"https://api.github.com/repos/yuanqing/gulp-tape/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuanqing/gulp-tape/downloads","issues_url":"https://api.github.com/repos/yuanqing/gulp-tape/issues{/number}","pulls_url":"https://api.github.com/repos/yuanqing/gulp-tape/pulls{/number}","milestones_url":"https://api.github.com/repos/yuanqing/gulp-tape/milestones{/number}","notifications_url":"https://api.github.com/repos/yuanqing/gulp-tape/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuanqing/gulp-tape/labels{/name}","releases_url":"https://api.github.com/repos/yuanqing/gulp-tape/releases{/id}","created_at":"2015-07-05T13:51:43Z","updated_at":"2015-11-08T12:50:13Z","pushed_at":"2015-11-28T14:41:29Z","git_url":"git://github.com/yuanqing/gulp-tape.git","ssh_url":"git@github.com:yuanqing/gulp-tape.git","clone_url":"https://github.com/yuanqing/gulp-tape.git","svn_url":"https://github.com/yuanqing/gulp-tape","homepage":"","size":21,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/11"},"html":{"href":"https://github.com/yuanqing/gulp-tape/pull/11"},"issue":{"href":"https://api.github.com/repos/yuanqing/gulp-tape/issues/11"},"comments":{"href":"https://api.github.com/repos/yuanqing/gulp-tape/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yuanqing/gulp-tape/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/yuanqing/gulp-tape/statuses/ff56264c2292bf037a0b608ea8289f882feaf6b5"}}}}