diff options
author | Ruwan Geeganage <rpgeeg@gmail.com> | 2019-05-01 01:15:06 +0200 |
---|---|---|
committer | ZYSzys <zyszys98@gmail.com> | 2019-05-04 23:11:33 +0800 |
commit | eda4d3c59e02769a99cb58c369674a8f8f25974c (patch) | |
tree | 569337ce421d63cc88998aba77568f283d0fcab4 /test | |
parent | 96c789287bf4262019393d2620d33574e4cf492c (diff) | |
download | android-node-v8-eda4d3c59e02769a99cb58c369674a8f8f25974c.tar.gz android-node-v8-eda4d3c59e02769a99cb58c369674a8f8f25974c.tar.bz2 android-node-v8-eda4d3c59e02769a99cb58c369674a8f8f25974c.zip |
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>
Diffstat (limited to 'test')
-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'); +} |