]> zoso.dev Git - buffer.git/commitdiff
simplify toArrayBuffer test
authorFeross Aboukhadijeh <feross@feross.org>
Wed, 4 Dec 2013 10:11:35 +0000 (02:11 -0800)
committerFeross Aboukhadijeh <feross@feross.org>
Wed, 4 Dec 2013 10:11:35 +0000 (02:11 -0800)
test/basic.js

index 8075b61c2a12005b779af80b3437ba70a069b999..5845dcdab873d8d07e89135141f3fff9e2cbf451 100644 (file)
@@ -27,8 +27,8 @@ test('buffer toArrayBuffer()', function (t) {
     t.plan(1)
     var data = [1, 2, 3, 4, 5, 6, 7, 8]
     t.equal(
-        arraybufferToString(new B(data).slice(4).toArrayBuffer()),
-        arraybufferToString(new Uint8Array(new Uint8Array(data).subarray(4)).buffer)
+        arraybufferToString(new B(data).toArrayBuffer()),
+        arraybufferToString(new Uint8Array(data).buffer)
     )
     t.end()
 })