From: Johan Bergström Date: Wed, 4 Mar 2015 00:35:56 +0000 (+1100) Subject: test: don't assume process.versions.openssl always is available X-Git-Tag: v1.5.0~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0e7c359a7029988ab8feac6d77761f9ce036a8b;p=platform%2Fupstream%2Fnodejs.git test: don't assume process.versions.openssl always is available PR-URL: https://github.com/iojs/io.js/pull/1049 Reviewed-By: Ben Noordhuis Reviewed-By: Shigeki Ohtsu --- diff --git a/test/parallel/test-process-versions.js b/test/parallel/test-process-versions.js index 63bf6d1..78c4aa8 100644 --- a/test/parallel/test-process-versions.js +++ b/test/parallel/test-process-versions.js @@ -1,7 +1,11 @@ -require('../common'); +var common = require('../common'); var assert = require('assert'); var expected_keys = ['ares', 'http_parser', 'modules', 'node', - 'openssl', 'uv', 'v8', 'zlib']; + 'uv', 'v8', 'zlib']; -assert.deepEqual(Object.keys(process.versions).sort(), expected_keys); +if(common.hasCrypto) { + expected_keys.push('openssl'); +} + +assert.deepEqual(Object.keys(process.versions).sort(), expected_keys.sort());