From 114f9d619d1da11f5120393da9c192320b685b9a Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 8 Mar 2017 13:39:57 +0100 Subject: [PATCH] test: add hasCrypto check to tls-socket-close Currently test-tls-socket-close will fail if node was built using --without-ssl. This commit adds a check to verify is crypto support exists and if not skip this test. PR-URL: https://github.com/nodejs/node/pull/11911 Reviewed-By: Ben Noordhuis Reviewed-By: Luigi Pinca Reviewed-By: Yuta Hiroto Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- test/parallel/test-tls-socket-close.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parallel/test-tls-socket-close.js b/test/parallel/test-tls-socket-close.js index 440c0c4ff7cde7..4e7382f3407a8a 100644 --- a/test/parallel/test-tls-socket-close.js +++ b/test/parallel/test-tls-socket-close.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');