Skip to content

Commit ca720b3

Browse files
rpgeeganagetargos
authored andcommittedMay 5, 2019
test: converting NghttpError to string in HTTP2 module
PR-URL: #27506 Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent bb373d0 commit ca720b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎test/parallel/test-http2-util-nghttp2error.js

+6
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ common.expectsError(() => {
1414
type: NghttpError,
1515
message: 'Invalid argument'
1616
});
17+
18+
// Should convert the NghttpError object to string properly
19+
{
20+
const err = new NghttpError(401);
21+
strictEqual(err.toString(), 'Error [ERR_HTTP2_ERROR]: Unknown error code');
22+
}

0 commit comments

Comments
 (0)
Please sign in to comment.