Skip to content

Commit

Permalink
[squash] update tls.createSecurePair argument errors in test
Browse files Browse the repository at this point in the history
  • Loading branch information
joyeecheung committed Jan 15, 2018
1 parent 7e8ecc9 commit 4554a4b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/parallel/test-tls-basic-validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ assert.throws(() => tls.createServer({ ticketKeys: 'abcd' }),
assert.throws(() => tls.createServer({ ticketKeys: Buffer.alloc(0) }),
/TypeError: Ticket keys length must be 48 bytes/);

assert.throws(() => tls.createSecurePair({}),
/TypeError: Second argument should be a SecureContext instance/);
common.expectsError(
() => tls.createSecurePair({}),
{
code: 'ERR_ASSERTION',
message: 'context.context must be a NativeSecureContext'
}
);

{
const buffer = Buffer.from('abcd');
Expand Down

0 comments on commit 4554a4b

Please sign in to comment.