test: add hasCrypto check to https-agent-constructor
Currently this test will fail with the following error message when configured --without-ssl: Error: Node.js is not compiled with openssl crypto support This commit checks for crypto and skips this tests if such support is not available. PR-URL: https://github.com/nodejs/node/pull/12987 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
945f208081
commit
b5ae22dd1c
@ -1,5 +1,9 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const common = require('../common');
|
||||
if (!common.hasCrypto) {
|
||||
common.skip('missing crypto');
|
||||
return;
|
||||
}
|
||||
const assert = require('assert');
|
||||
const https = require('https');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user