From b5ae22dd1c7455178178c56a1eca3d5f72eff39e Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 12 May 2017 07:40:13 +0200 Subject: [PATCH] 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 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- test/parallel/test-https-agent-constructor.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-https-agent-constructor.js b/test/parallel/test-https-agent-constructor.js index 942ad07b4a..fe77381c85 100644 --- a/test/parallel/test-https-agent-constructor.js +++ b/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');