You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
402 B

// Flags: --expose-internals
'use strict';
const common = require('../common');
const assert = require('assert');
const util = require('internal/util');
if (!process.versions.openssl) {
const expectedError = common.expectsError({
code: 'ERR_NO_CRYPTO',
type: Error
});
assert.throws(() => util.assertCrypto(), expectedError);
} else {
assert.doesNotThrow(() => util.assertCrypto());
}