From 316891f661085fb4925b21a6d9d1a5089ff4f274 Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Sat, 12 Nov 2016 17:04:42 +0900 Subject: [PATCH] test: change from setTimeout to setImmediate This is a part of Code And Learn at NodeFest 2016 Challenge --- test/parallel/test-stream-unshift-empty-chunk.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-stream-unshift-empty-chunk.js b/test/parallel/test-stream-unshift-empty-chunk.js index 99c2e8b7520144..477f5c4be56bac 100644 --- a/test/parallel/test-stream-unshift-empty-chunk.js +++ b/test/parallel/test-stream-unshift-empty-chunk.js @@ -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); }); };