diff options
Diffstat (limited to 'test/parallel/test-stream-end-paused.js')
-rw-r--r-- | test/parallel/test-stream-end-paused.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/test/parallel/test-stream-end-paused.js b/test/parallel/test-stream-end-paused.js index 9cc32db880..96a9c4ee13 100644 --- a/test/parallel/test-stream-end-paused.js +++ b/test/parallel/test-stream-end-paused.js @@ -1,7 +1,6 @@ 'use strict'; -require('../common'); +const common = require('../common'); var assert = require('assert'); -var gotEnd = false; // Make sure we don't miss the end event for paused 0-length streams @@ -19,15 +18,12 @@ stream.on('data', function() { }); stream.pause(); -setTimeout(function() { - stream.on('end', function() { - gotEnd = true; - }); +setTimeout(common.mustCall(function() { + stream.on('end', common.mustCall(function() {})); stream.resume(); -}); +})); process.on('exit', function() { - assert(gotEnd); assert(calledRead); console.log('ok'); }); |