From: Feross Aboukhadijeh Date: Tue, 10 Mar 2015 19:35:54 +0000 (-0700) Subject: tests: don't bundle crypto-browserify (breaks old IEs) X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=c2dd81f0a0c5369e8953afb1cb9d035e6663a746;p=buffer.git tests: don't bundle crypto-browserify (breaks old IEs) --- diff --git a/bin/download-node-tests.js b/bin/download-node-tests.js index 24fe48d..49abe18 100755 --- a/bin/download-node-tests.js +++ b/bin/download-node-tests.js @@ -92,7 +92,7 @@ function testfixer (filename) { // and crypto-browserify doesn't work in old // versions of ie if (filename === 'test-buffer.js') { - line = line.replace(/^(var crypto = require.*)/, '// $1') + line = line.replace(/^(\s*)(var crypto = require.*)/, '$1// $2') line = line.replace(/(crypto.createHash.*\))/, '1 /*$1*/') } diff --git a/test/node/test-buffer.js b/test/node/test-buffer.js index 9bb56e4..2c57965 100644 --- a/test/node/test-buffer.js +++ b/test/node/test-buffer.js @@ -1112,7 +1112,7 @@ assert.throws(function () { if (common.hasCrypto) { // Test truncation after decode - var crypto = require('crypto'); + // var crypto = require('crypto'); var b1 = new Buffer('YW55=======', 'base64'); var b2 = new Buffer('YW55', 'base64');