From 5debcceafcdd73035d840f53deb931925691a3ab 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-wrap-event-emmiter 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/13041 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- test/parallel/test-tls-wrap-event-emmiter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-tls-wrap-event-emmiter.js b/test/parallel/test-tls-wrap-event-emmiter.js index b468304249e1f3..417b21804a4075 100644 --- a/test/parallel/test-tls-wrap-event-emmiter.js +++ b/test/parallel/test-tls-wrap-event-emmiter.js @@ -5,7 +5,11 @@ * Test checks if we get exception instead of runtime error */ -require('../common'); +const common = require('../common'); +if (!common.hasCrypto) { + common.skip('missing crypto'); + return; +} const assert = require('assert'); const TlsSocket = require('tls').TLSSocket;