Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End the stream created when done #11

Merged
merged 4 commits into from
Dec 1, 2015

Conversation

zoubin
Copy link
Collaborator

@zoubin zoubin commented Nov 28, 2015

Fix #10 and #8

The 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.

I 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.
However, the reporter will never receive messages created when results.close called. So I push them manually.

I'm not quite sure whether we should end the tape output and push the extra messages.
What do you say? @yuanqing

@@ -28,22 +28,42 @@ var gulpTape = function(opts) {

var flush = function(cb) {
try {
tape.createStream(tapeOpts).pipe(reporter).pipe(outputStream);
var tapeOutput = tape.createStream(tapeOpts);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer tapeStream rather than tapeOutput

@yuanqing
Copy link
Owner

@zoubin Am OK with merging this and cutting a 0.0.7 until we can find a better solution

@zoubin
Copy link
Collaborator Author

zoubin commented Dec 1, 2015

@yuanqing OK. I'll release 0.0.7 later today.

zoubin added a commit that referenced this pull request Dec 1, 2015
@zoubin zoubin merged commit 2b02659 into yuanqing:master Dec 1, 2015
@zoubin
Copy link
Collaborator Author

zoubin commented Dec 1, 2015

Done. 0.0.7 released.

@zoubin zoubin deleted the end-the-stream-created-when-done branch December 1, 2015 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task never exits when run after the 1st time from a gulp watch
2 participants