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
Next Next commit
test: add test call ECDH without new keyword
  • Loading branch information
Leko committed Dec 18, 2017
commit d7fa1194da63fa051240b2d20d4efb4d946ef15b
7 changes: 7 additions & 0 deletions test/parallel/test-crypto-dh.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ assert.strictEqual(dh2.verifyError, 0);
'called without `new`');
}

{
const ECDH = crypto.ECDH;
const dh = ECDH('prime256v1');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: how about changing the variable name to ecdh?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review.
I fixed variable names.

assert(dh instanceof ECDH, 'ECDH is expected to return a new instance when ' +
'called without `new`');
}

[
[0x1, 0x2],
() => { },
Expand Down