| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 28111f9 commit 3248cdb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,18 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + | ||
| 4 | + if (!common.hasCrypto) { | ||
| 5 | + common.skip('missing crypto'); | ||
| 6 | + return; | ||
| 7 | + } | ||
| 8 | + | ||
| 9 | + const assert = require('assert'); | ||
| 10 | + const crypto = require('crypto'); | ||
| 11 | + | ||
| 12 | + assert.throws(function() { | ||
| 13 | + crypto.setEngine(true); | ||
| 14 | + }, /^TypeError: "id" argument should be a string$/); | ||
| 15 | + | ||
| 16 | + assert.throws(function() { | ||
| 17 | + crypto.setEngine('/path/to/engine', 'notANumber'); | ||
| 18 | + }, /^TypeError: "flags" argument should be a number, if present$/); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments