Skip to content

Commit

Permalink
test: change from setTimeout to setImmediate
Browse files Browse the repository at this point in the history
This is a part of Code And Learn at NodeFest 2016 Challenge

Fixes: nodejs/code-and-learn#58
PR-URL: #9578
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
fossamagna authored and shigeki committed Nov 13, 2016
1 parent a3dd943 commit 8a78fcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-stream-unshift-empty-chunk.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var nChunks = 10;
var chunk = Buffer.alloc(10, 'x');

r._read = function(n) {
setTimeout(function() {
setImmediate(function() {
r.push(--nChunks === 0 ? null : chunk);
});
};
Expand Down

0 comments on commit 8a78fcb

Please sign in to comment.