Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e5500f8

Browse filesBrowse files
rxiaythMylesBorins
authored andcommitted
test: added test for generateKeyPair
PR-URL: #23541 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent adc89e3 commit e5500f8
Copy full SHA for e5500f8

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-crypto-keygen.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-crypto-keygen.js
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,16 @@ function convertDERToPEM(label, der) {
358358
});
359359
}
360360

361+
{
362+
// Test keygen without options object.
363+
common.expectsError(() => generateKeyPair('rsa', common.mustNotCall()), {
364+
type: TypeError,
365+
code: 'ERR_INVALID_ARG_TYPE',
366+
message: 'The "options" argument must be of ' +
367+
'type object. Received type undefined'
368+
});
369+
}
370+
361371
{
362372
// Missing / invalid publicKeyEncoding.
363373
for (const enc of [undefined, null, 0, 'a', true]) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.