You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
378 B

// Flags: --expose-internals
'use strict';
const common = require('../common');
const { strictEqual } = require('assert');
const { NghttpError } = require('internal/http2/util');
common.expectsError(() => {
const err = new NghttpError(-501);
strictEqual(err.errno, -501);
throw err;
}, {
code: 'ERR_HTTP2_ERROR',
type: NghttpError,
message: 'Invalid argument'
});