Skip to content

Commit

Permalink
skip crypto tests in old node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Oct 9, 2020
1 parent 3d90c14 commit eb0e153
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/crypto.js
Expand Up @@ -4,6 +4,7 @@ var path = require('path');
var fs = require('fs');
var vm = require('vm');
var concat = require('concat-stream');
var semver = require('semver');

var temp = require('temp');
temp.track();
Expand All @@ -13,7 +14,8 @@ fs.writeFileSync(tmpdir + '/main.js', 'beep(require("crypto"))\n');

if (!ArrayBuffer.isView) ArrayBuffer.isView = function () { return false; };

test('*-browserify libs from node_modules/', function (t) {
// `crypto-browserify` no longer works in node.js <4
test('*-browserify libs from node_modules/', { skip: semver.lt(process.version, 'v4.0.0') }, function (t) {
t.plan(2);

var bin = __dirname + '/../bin/cmd.js';
Expand Down
4 changes: 3 additions & 1 deletion test/crypto_ig.js
Expand Up @@ -4,6 +4,7 @@ var path = require('path');
var fs = require('fs');
var vm = require('vm');
var concat = require('concat-stream');
var semver = require('semver');

var temp = require('temp');
temp.track();
Expand All @@ -13,7 +14,8 @@ fs.writeFileSync(tmpdir + '/main.js', 'beep(require("crypto"))\n');

if (!ArrayBuffer.isView) ArrayBuffer.isView = function () { return false; };

test('crypto --insertGlobals', function (t) {
// `crypto-browserify` no longer works in node.js <4
test('crypto --insertGlobals', { skip: semver.lt(process.version, 'v4.0.0') }, function (t) {
t.plan(2);

var bin = __dirname + '/../bin/cmd.js';
Expand Down

0 comments on commit eb0e153

Please sign in to comment.