mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
test: converting NghttpError to string in HTTP2 module
PR-URL: https://github.com/nodejs/node/pull/27506 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
bb373d0def
commit
ca720b3a55
1 file changed
+6
@@ -14,3 +14,9 @@ common.expectsError(() => {
|
||||
type: NghttpError,
|
||||
message: 'Invalid argument'
|
||||
});
|
||||
|
||||
// Should convert the NghttpError object to string properly
|
||||
{
|
||||
const err = new NghttpError(401);
|
||||
strictEqual(err.toString(), 'Error [ERR_HTTP2_ERROR]: Unknown error code');
|
||||
}
|
||||
Reference in new issue
Block a user