Skip to content

Commit

Permalink
test: add hasCrypto to tls-wrap-event-emmiter
Browse files Browse the repository at this point in the history
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: #13041
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
danbev committed May 17, 2017
1 parent ad7b98b commit 5debcce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/parallel/test-tls-wrap-event-emmiter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5debcce

Please sign in to comment.