Update vendors.

Former-commit-id: 88e9746e94e8ec899227b1a925bea4ab4d373fb0
This commit is contained in:
John-David Dalton
2012-08-31 12:47:55 -07:00
parent 141c10f6fe
commit 9100db55b0
13 changed files with 474 additions and 355 deletions

View File

@@ -18,6 +18,16 @@ $(document).ready(function() {
equal(_.values({one : 1, two : 2}).join(', '), '1, 2', 'can extract the values from an object');
});
test("objects: pairs", function() {
deepEqual(_.pairs({one: 1, two: 2}), [['one', 1], ['two', 2]], 'can convert an object into pairs');
});
test("objects: invert", function() {
var obj = {first: 'Moe', second: 'Larry', third: 'Curly'};
equal(_.keys(_.invert(obj)).join(' '), 'Moe Larry Curly', 'can invert an object');
ok(_.isEqual(_.invert(_.invert(obj)), obj), 'two inverts gets you back where you started');
});
test("objects: functions", function() {
var obj = {a : 'dash', b : _.map, c : (/yo/), d : _.reduce};
ok(_.isEqual(['b', 'd'], _.functions(obj)), 'can grab the function names of any passed-in object');