Skip to content

Commit

Permalink
test: add hasCrypto to tls-lookup
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: #13047
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: David Cai <davidcai1993@yahoo.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
danbev committed May 18, 2017
1 parent 0dd8b9a commit 6933419
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/parallel/test-tls-lookup.js
Original file line number Diff line number Diff line change
@@ -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');

Expand Down

0 comments on commit 6933419

Please sign in to comment.