Skip to content

Commit 58fc7a1

Browse files
fossamagnaaddaleax
authored andcommitted
test: change from setTimeout to setImmediate
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 <[email protected]> Reviewed-By: Shigeki Ohtsu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 4ae4e00 commit 58fc7a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-stream-unshift-empty-chunk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var nChunks = 10;
1111
var chunk = Buffer.alloc(10, 'x');
1212

1313
r._read = function(n) {
14-
setTimeout(function() {
14+
setImmediate(function() {
1515
r.push(--nChunks === 0 ? null : chunk);
1616
});
1717
};

0 commit comments

Comments
 (0)