test: move require('http2') after crypto check

This test currently fails when configured --without-ssl:
Error [ERR_NO_CRYPTO]:
Node.js is not compiled with OpenSSL crypto support

This commit moves the require of http2 to come after the crypto check to
avoid the error.

PR-URL: https://github.com/nodejs/node/pull/19907
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Daniel Bevenius authored and James M Snell committed 2018-04-16 16:01:28 -07:00
1 parent 4162115326
commit e14585fa27
1 file changed
+1 -1
@@ -1,11 +1,11 @@
'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 [
[ '' ],