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:
parent
96c789287b
commit
eda4d3c59e
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user