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 MylesBorins committed Dec 20, 2016
1 parent eca12d4 commit b87fe25
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 @@ -12,7 +12,7 @@ var chunk = new Buffer(10);
chunk.fill('x');

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

0 comments on commit b87fe25

Please sign in to comment.