Skip to content

Commit

Permalink
test: http2.connect call destroy when init fail
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Aug 1, 2019
1 parent 7b3d2da commit 43454d4
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 43454d4

Please sign in to comment.