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: nodejs#9578
Reviewed-By: Yosuke Furukawa <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
fossamagna authored and addaleax committed Dec 8, 2016
1 parent 92f8073 commit 8a94c69
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 8a94c69

Please sign in to comment.