diff --git a/test/simple/test-child-process-stdout-flush.js b/test/simple/test-child-process-stdout-flush.js index 5c5bed230a0..8dc39c3a5b8 100644 --- a/test/simple/test-child-process-stdout-flush.js +++ b/test/simple/test-child-process-stdout-flush.js @@ -40,7 +40,7 @@ child.stderr.on('data', function(data) { assert.ok(false); }); -child.stderr.setEncoding('utf8'); +child.stdout.setEncoding('utf8'); child.stdout.on('data', function(data) { count += data.length; console.log(count);