From 86d71a97241ff84b071a0ff4aed68a99919014ff Mon Sep 17 00:00:00 2001 From: James Halliday Date: Thu, 26 Aug 2010 20:27:29 -0800 Subject: [PATCH] tests for valuesAt and extract pass --- test/hash.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/hash.js b/test/hash.js index 02b57cf..ba7ffea 100755 --- a/test/hash.js +++ b/test/hash.js @@ -65,5 +65,12 @@ exports['hash traversal'] = function (assert) { assert.equal(merged.length, 4); assert.equal(hash3.items.c, 3); assert.equal(hash3.length, 3); + + var extracted = hash3.extract(['a','b']); + assert.equal(extracted.length, 2); + assert.equal(extracted.items.a, 0); + assert.equal(extracted.items.b, 2); + + assert.equal(hash3.valuesAt(['a','b']).join(' '), '0 2'); };