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.connect call destroy when init fail
  • Loading branch information
himself65 committed Aug 1, 2019
commit 43454d48482ac7c60f04d5656f6d4f0355ed6eb3
14 changes: 14 additions & 0 deletions test/parallel/test-http2-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ const { connect: netConnect } = require('net');
connect(authority).on('error', () => {});
}

// Check for error for init settings error
{
createServer(function() {
connect(`http://localhost:${this.address().port}`, {
settings: {
maxFrameSize: 1 // An incorrect settings
}
}).on('error', expectsError({
code: 'ERR_HTTP2_INVALID_SETTING_VALUE',
type: RangeError
}));
});
}

// Check for error for an invalid protocol (not http or https)
{
const authority = 'ssh://localhost';
Expand Down