From 7f7e9935c29d0fa4046faf5a690e768cc6dc473b Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Sat, 3 Mar 2018 19:05:12 +0100 Subject: [PATCH] test: move require http2 to after crypto check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently test-http2-client-write-empty-string.js will throw "Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support" when configured --without-ssl. This commit moves the require of http2 to after the crypto check to avoid this error. PR-URL: https://github.com/nodejs/node/pull/19111 Reviewed-By: Anatoli Papirovski Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Tobias Nießen Reviewed-By: James M Snell Reviewed-By: Jon Moss --- test/parallel/test-http2-client-write-empty-string.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-http2-client-write-empty-string.js b/test/parallel/test-http2-client-write-empty-string.js index c10698d417038d..8b8cb3d6404e1e 100644 --- a/test/parallel/test-http2-client-write-empty-string.js +++ b/test/parallel/test-http2-client-write-empty-string.js @@ -1,12 +1,13 @@ 'use strict'; const assert = require('assert'); -const http2 = require('http2'); const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +const http2 = require('http2'); + for (const chunkSequence of [ [ '' ], [ '', '' ]