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 0afcea2

Browse filesBrowse files
LekoMylesBorins
authored andcommitted
test: add test case for missing branch
- The case of id is string, flags is number - The case of flags is not 0 PR-URL: #17418 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
1 parent c9a4f4f commit 0afcea2
Copy full SHA for 0afcea2

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

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

Copy file name to clipboardExpand all lines: test/parallel/test-crypto-engine.js
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ if (!common.hasCrypto)
55
common.skip('missing crypto');
66

77
const crypto = require('crypto');
8+
const invalidEngineName = 'xxx';
89

910
common.expectsError(
1011
() => crypto.setEngine(true),
@@ -21,3 +22,19 @@ common.expectsError(
2122
type: TypeError,
2223
message: 'The "flags" argument must be of type number'
2324
});
25+
26+
common.expectsError(
27+
() => crypto.setEngine(invalidEngineName),
28+
{
29+
code: 'ERR_CRYPTO_ENGINE_UNKNOWN',
30+
type: Error,
31+
message: `Engine "${invalidEngineName}" was not found`
32+
});
33+
34+
common.expectsError(
35+
() => crypto.setEngine(invalidEngineName, crypto.constants.ENGINE_METHOD_RSA),
36+
{
37+
code: 'ERR_CRYPTO_ENGINE_UNKNOWN',
38+
type: Error,
39+
message: `Engine "${invalidEngineName}" was not found`
40+
});

0 commit comments

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