diff options
-rw-r--r-- | test/parallel/test-http2-util-nghttp2error.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/parallel/test-http2-util-nghttp2error.js b/test/parallel/test-http2-util-nghttp2error.js index 7a9009515b..100ce2cb45 100644 --- a/test/parallel/test-http2-util-nghttp2error.js +++ b/test/parallel/test-http2-util-nghttp2error.js @@ -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'); +} |