]> zoso.dev Git - buffer.git/commitdiff
tests: don't bundle crypto-browserify (breaks old IEs)
authorFeross Aboukhadijeh <feross@feross.org>
Tue, 10 Mar 2015 19:35:54 +0000 (12:35 -0700)
committerFeross Aboukhadijeh <feross@feross.org>
Tue, 10 Mar 2015 19:35:54 +0000 (12:35 -0700)
bin/download-node-tests.js
test/node/test-buffer.js

index 24fe48da1a007d033aabe8ecc1103e91f4523e37..49abe18da0b0c07697f0f7a618acf8f8415c8d74 100755 (executable)
@@ -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*/')
     }
 
index 9bb56e428776882bd82197c62bde5349356020b1..2c57965383ca01306e5a653be7ded70fd95a7d93 100644 (file)
@@ -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');