mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 13:40:37 +00:00

Refs: https://github.com/nodejs/node/issues/6083 PR-URL: https://github.com/nodejs/node/pull/31182 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
16 lines
314 B
JavaScript
16 lines
314 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const { Readable } = require('stream');
|
|
|
|
{
|
|
const r = new Readable({ read() {} });
|
|
|
|
r.on('end', common.mustNotCall());
|
|
r.on('data', common.mustCall());
|
|
r.on('error', common.mustCall());
|
|
r.push('asd');
|
|
r.push(null);
|
|
r.destroy(new Error('kaboom'));
|
|
}
|