From 9b30c54d52e424d4435ec5ba4c7e4f74bb140aec Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Thu, 10 Apr 2014 00:02:47 -0700 Subject: [PATCH] Use correct Buffer in tests `new B` instead of `new Buffer`, otherwise browserify will inline the old version in the tests and we won't be testing anything. :) --- test/slice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/slice.js b/test/slice.js index 6a5914f..4efbe30 100644 --- a/test/slice.js +++ b/test/slice.js @@ -4,7 +4,7 @@ var test = require('tape') test('modifying buffer created by .slice() modifies original memory', function (t) { if (!B._useTypedArrays) return t.end() - var buf1 = new Buffer(26) + var buf1 = new B(26) for (var i = 0 ; i < 26 ; i++) { buf1[i] = i + 97 // 97 is ASCII a } @@ -21,7 +21,7 @@ test('modifying buffer created by .slice() modifies original memory', function ( test('modifying parent buffer modifies .slice() buffer\'s memory', function (t) { if (!B._useTypedArrays) return t.end() - var buf1 = new Buffer(26) + var buf1 = new B(26) for (var i = 0 ; i < 26 ; i++) { buf1[i] = i + 97 // 97 is ASCII a } -- 2.34.1