From 2a7c652fa82909616f20ff198458cea7c60f8f45 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Thu, 6 Aug 2015 22:11:11 +1000 Subject: [PATCH] split ascending/descending copy tests --- test/methods.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/methods.js b/test/methods.js index be92568..f9337e1 100644 --- a/test/methods.js +++ b/test/methods.js @@ -101,11 +101,14 @@ test('copy() after slice()', function (t) { }) test('copy() ascending and descending', function (t) { - var b - b = new B('abcdefghij') + var b = new B('abcdefghij') b.copy(b, 0, 3, 10) // ascending copy t.equal(b.toString(), 'defghijhij') - b = new B('abcdefghij') + t.end() +}) + +test('copy() descending', function (t) { + var b = new B('abcdefghij') b.copy(b, 3, 0, 7) // descending copy t.equal(b.toString(), 'abcabcdefg') t.end() -- 2.34.1