diff options
Diffstat (limited to 'test/parallel')
-rw-r--r-- | test/parallel/test-stream-readable-destroy.js | 9 | ||||
-rw-r--r-- | test/parallel/test-wrap-js-stream-exceptions.js | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/test/parallel/test-stream-readable-destroy.js b/test/parallel/test-stream-readable-destroy.js index 05e7dd464d..7687ea90cc 100644 --- a/test/parallel/test-stream-readable-destroy.js +++ b/test/parallel/test-stream-readable-destroy.js @@ -189,3 +189,12 @@ const assert = require('assert'); read.push('hi'); read.on('data', common.mustNotCall()); } + +{ + const read = new Readable({ + read: common.mustNotCall(function() {}) + }); + read.destroy(); + assert.strictEqual(read.destroyed, true); + read.read(); +} diff --git a/test/parallel/test-wrap-js-stream-exceptions.js b/test/parallel/test-wrap-js-stream-exceptions.js index cde7c17844..eeab26f525 100644 --- a/test/parallel/test-wrap-js-stream-exceptions.js +++ b/test/parallel/test-wrap-js-stream-exceptions.js @@ -10,7 +10,7 @@ process.once('uncaughtException', common.mustCall((err) => { })); const socket = new JSStreamWrap(new Duplex({ - read: common.mustCall(), + read: common.mustNotCall(), write: common.mustCall((buffer, data, cb) => { throw new Error('exception!'); }) |