Skip to content

Commit

Permalink
tests for valuesAt and extract pass
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Aug 27, 2010
1 parent 883f015 commit 86d71a9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
};

0 comments on commit 86d71a9

Please sign in to comment.