mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 15:32:15 +00:00

The tap skipping output is so prevalent yet obscure in nature that we ought to move it into it's own function in test/common.js PR-URL: https://github.com/nodejs/node/pull/6697 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
23 lines
605 B
JavaScript
23 lines
605 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
try {
|
|
var crypto = require('crypto');
|
|
} catch (e) {
|
|
common.skip('node compiled without OpenSSL.');
|
|
return;
|
|
}
|
|
|
|
// Pollution of global is intentional as part of test.
|
|
common.globalCheck = false;
|
|
// See https://github.com/nodejs/node/commit/d1eff9ab
|
|
global.domain = require('domain');
|
|
|
|
// should not throw a 'TypeError: undefined is not a function' exception
|
|
crypto.randomBytes(8);
|
|
crypto.randomBytes(8, function() {});
|
|
crypto.pseudoRandomBytes(8);
|
|
crypto.pseudoRandomBytes(8, function() {});
|
|
crypto.pbkdf2('password', 'salt', 8, 8, function() {});
|