From 6933419cb919e42b03ef980e762f19e70d3d0c29 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 15 May 2017 20:39:52 +0200 Subject: [PATCH] test: add hasCrypto to tls-lookup Currently when building --without-ssl this test will report the following error: internal/util.js:82 throw new Error('Node.js is not compiled with openssl crypto support'); This commit adds a check for crypto and skips this test if node was built without ssl support. PR-URL: https://github.com/nodejs/node/pull/13047 Reviewed-By: Refael Ackermann Reviewed-By: Rich Trott Reviewed-By: David Cai Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- test/parallel/test-tls-lookup.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parallel/test-tls-lookup.js b/test/parallel/test-tls-lookup.js index 698f0680767539..cebb85c4b2a60f 100644 --- a/test/parallel/test-tls-lookup.js +++ b/test/parallel/test-tls-lookup.js @@ -1,5 +1,9 @@ 'use strict'; const common = require('../common'); +if (!common.hasCrypto) { + common.skip('missing crypto'); + return; +} const assert = require('assert'); const tls = require('tls');