mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
8de858b96d
Refs: https://github.com/nodejs/node/pull/41433#issuecomment-1009551922 PR-URL: https://github.com/nodejs/node/pull/41486 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
24 lines
416 B
JavaScript
24 lines
416 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const {
|
|
Duplex,
|
|
} = require('stream');
|
|
|
|
{
|
|
class Foo extends Duplex {
|
|
_final(callback) {
|
|
throw new Error('fhqwhgads');
|
|
}
|
|
|
|
_read() {}
|
|
}
|
|
|
|
const foo = new Foo();
|
|
foo._write = common.mustCall((chunk, encoding, cb) => {
|
|
cb();
|
|
});
|
|
foo.end('test', common.expectsError({ message: 'fhqwhgads' }));
|
|
foo.on('error', common.mustCall());
|
|
}
|