Skip to content

Commit

Permalink
test: move require http2 to after crypto check
Browse files Browse the repository at this point in the history
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: #19111
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
  • Loading branch information
danbev authored and MylesBorins committed Mar 6, 2018
1 parent 0b22bab commit 7448712
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-http2-client-write-empty-string.js
Original file line number Diff line number Diff line change
@@ -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 [
[ '' ],
[ '', '' ]
Expand Down

0 comments on commit 7448712

Please sign in to comment.