Permalink
Browse files

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: #12987
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information...
danbev committed May 12, 2017
1 parent 945f208 commit b5ae22dd1c7455178178c56a1eca3d5f72eff39e
Showing with 5 additions and 1 deletion.
  1. +5 −1 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');

0 comments on commit b5ae22d

Please sign in to comment.