Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: http2 test coverage for NghttpError
small test verifying that the NghttpError is as expected
  • Loading branch information
jasnell committed Aug 30, 2017
commit d96349104ad97ba3d5dde882d50bbc163f6ea10f
16 changes: 16 additions & 0 deletions test/parallel/test-http2-util-nghttp2error.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 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'
});