Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c0aec67

Browse filesBrowse files
TrottBethGriggs
authored andcommitted
test: increase coverage for stream writable
Refs: #41433 (comment) PR-URL: #41486 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 31d75f2 commit c0aec67
Copy full SHA for c0aec67

File tree

Expand file treeCollapse file tree

1 file changed

+23
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+23
-0
lines changed
Open diff view settings
Collapse file
+23Lines changed: 23 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.