Skip to content

Commit b5ae22d

Browse files
committed
test: add hasCrypto check to https-agent-constructor
Currently this test will fail with the following error message when configured --without-ssl: Error: Node.js is not compiled with openssl crypto support This commit checks for crypto and skips this tests if such support is not available. PR-URL: #12987 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 945f208 commit b5ae22d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/parallel/test-https-agent-constructor.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'use strict';
2-
require('../common');
2+
const common = require('../common');
3+
if (!common.hasCrypto) {
4+
common.skip('missing crypto');
5+
return;
6+
}
37
const assert = require('assert');
48
const https = require('https');
59

0 commit comments

Comments
 (0)