Skip to content

Commit c0aec67

Browse files
TrottBethGriggs
authored andcommitted
test: increase coverage for stream writable
Refs: #41433 (comment) PR-URL: #41486 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 31d75f2 commit c0aec67

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
const {
5+
Duplex,
6+
} = require('stream');
7+
8+
{
9+
class Foo extends Duplex {
10+
_final(callback) {
11+
throw new Error('fhqwhgads');
12+
}
13+
14+
_read() {}
15+
}
16+
17+
const foo = new Foo();
18+
foo._write = common.mustCall((chunk, encoding, cb) => {
19+
cb();
20+
});
21+
foo.end('test', common.expectsError({ message: 'fhqwhgads' }));
22+
foo.on('error', common.mustCall());
23+
}

0 commit comments

Comments
 (0)