mirror of
https://github.com/nodejs/node.git
synced 2025-05-01 17:03:34 +00:00

PR-URL: https://github.com/nodejs/node/pull/11834 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
15 lines
354 B
JavaScript
15 lines
354 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const util = require('internal/util');
|
|
|
|
if (!process.versions.openssl) {
|
|
assert.throws(
|
|
() => util.assertCrypto(),
|
|
/^Error: Node\.js is not compiled with openssl crypto support$/
|
|
);
|
|
} else {
|
|
assert.doesNotThrow(() => util.assertCrypto());
|
|
}
|