Browse Source

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>
v6
Daniel Bevenius 8 years ago
parent
commit
b5ae22dd1c
  1. 6
      test/parallel/test-https-agent-constructor.js

6
test/parallel/test-https-agent-constructor.js

@ -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…
Cancel
Save