Skip to content
Browse files

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:

Node.js is not compiled with OpenSSL crypto support
  at Object.assertCrypto (internal/util.js:101:11)
  at Object.<anonymous>

This commit moves the require statement to after the crypto check.

PR-URL: #25388
Reviewed-By: Rich Trott <>
Reviewed-By: Colin Ihrig <>
Reviewed-By: Richard Lau <>
Reviewed-By: James M Snell <>
  • Loading branch information...
danbev authored and addaleax committed Jan 8, 2019
1 parent dcbf1d9 commit fe9b6ee88bc8bd033c0254cf7bd15ad42ab7dc68
Showing with 2 additions and 3 deletions.
  1. +2 −3 test/parallel/test-https-client-override-global-agent.js
@@ -1,12 +1,11 @@
'use strict';
const common = require('../common');
if (!common.hasCrypto)
common.skip('missing crypto');
const fixtures = require('../common/fixtures');
const assert = require('assert');
const https = require('https');

if (!common.hasCrypto)
common.skip('missing crypto');

// Disable strict server certificate validation by the client

0 comments on commit fe9b6ee

Please sign in to comment.
You can’t perform that action at this time.