diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2017-12-11 03:56:41 -0200 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-01-06 04:04:28 +0100 |
commit | f26cabbe249ae6e095736ef65bd925fb82c4908c (patch) | |
tree | dab6297265fd4690c224489b419a2e75140ca1ea /test/parallel/test-http2-respond-errors.js | |
parent | 22760f31be7f725c217f87b8a5244ff3179f54d6 (diff) | |
download | android-node-v8-f26cabbe249ae6e095736ef65bd925fb82c4908c.tar.gz android-node-v8-f26cabbe249ae6e095736ef65bd925fb82c4908c.tar.bz2 android-node-v8-f26cabbe249ae6e095736ef65bd925fb82c4908c.zip |
test: fix wrong error classes passed in as type
PR-URL: https://github.com/nodejs/node/pull/13686
Fixes: https://github.com/nodejs/node/issues/13682
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'test/parallel/test-http2-respond-errors.js')
-rw-r--r-- | test/parallel/test-http2-respond-errors.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/parallel/test-http2-respond-errors.js b/test/parallel/test-http2-respond-errors.js index 2a48456c93..5ec953c544 100644 --- a/test/parallel/test-http2-respond-errors.js +++ b/test/parallel/test-http2-respond-errors.js @@ -1,4 +1,5 @@ 'use strict'; +// Flags: --expose-internals const common = require('../common'); if (!common.hasCrypto) @@ -9,6 +10,7 @@ const { Http2Stream, nghttp2ErrorString } = process.binding('http2'); +const { NghttpError } = require('internal/http2/util'); // tests error handling within respond // - every other NGHTTP2 error from binding (should emit stream error) @@ -25,7 +27,8 @@ const genericTests = Object.getOwnPropertyNames(constants) ngError: constants[key], error: { code: 'ERR_HTTP2_ERROR', - type: Error, + type: NghttpError, + name: 'Error [ERR_HTTP2_ERROR]', message: nghttp2ErrorString(constants[key]) }, type: 'stream' |