Files
node/test/parallel/test-https-agent-constructor.js
Daniel Bevenius b5ae22dd1c 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>
2017-05-14 19:47:14 +02:00

12 lines
284 B
JavaScript

'use strict';
const common = require('../common');
if (!common.hasCrypto) {
common.skip('missing crypto');
return;
}
const assert = require('assert');
const https = require('https');
assert.doesNotThrow(() => { https.Agent(); });
assert.ok(https.Agent() instanceof https.Agent);