| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c9a4f4f commit 0afcea2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,7 @@ if (!common.hasCrypto) | |||
| 5 | 5 | common.skip('missing crypto'); | |
| 6 | 6 | ||
| 7 | 7 | const crypto = require('crypto'); | |
| 8 | + const invalidEngineName = 'xxx'; | ||
| 8 | 9 | ||
| 9 | 10 | common.expectsError( | |
| 10 | 11 | () => crypto.setEngine(true), | |
@@ -21,3 +22,19 @@ common.expectsError( | |||
| 21 | 22 | type: TypeError, | |
| 22 | 23 | message: 'The "flags" argument must be of type number' | |
| 23 | 24 | }); | |
| 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 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments