Skip to content

Commit

Permalink
test: converting NghttpError to string in HTTP2 module
Browse files Browse the repository at this point in the history
PR-URL: #27506
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
rpgeeganage authored and targos committed May 5, 2019
1 parent bb373d0 commit ca720b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/parallel/test-http2-util-nghttp2error.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

0 comments on commit ca720b3

Please sign in to comment.