Skip to content

Commit fe9b6ee

Browse files
danbevaddaleax
authored andcommitted
test: move require('https') to after crypto check
Currently, test-https-client-override-global-agent.js fails with the following error when configured --without-ssl: Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at Object.assertCrypto (internal/util.js:101:11) ... at Object.<anonymous> (/node/test/parallel/test-https-client-override-global-agent.js:5:15) This commit moves the require statement to after the crypto check. PR-URL: #25388 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent dcbf1d9 commit fe9b6ee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/parallel/test-https-client-override-global-agent.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
'use strict';
22
const common = require('../common');
3+
if (!common.hasCrypto)
4+
common.skip('missing crypto');
35
const fixtures = require('../common/fixtures');
46
const assert = require('assert');
57
const https = require('https');
68

7-
if (!common.hasCrypto)
8-
common.skip('missing crypto');
9-
109
// Disable strict server certificate validation by the client
1110
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
1211

0 commit comments

Comments
 (0)