mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
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>
This commit is contained in:
parent
22760f31be
commit
f26cabbe24
12 changed files with 45 additions and 16 deletions
|
@ -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 additionalHeaders
|
||||
// - every other NGHTTP2 error from binding (should emit stream error)
|
||||
|
@ -24,7 +26,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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue