Skip to content

Commit

Permalink
Cleanup _.toArray unit test addition.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Dec 1, 2012
1 parent 97037bc commit 17e40e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,12 @@ $(document).ready(function() {
var numbers = _.toArray({one : 1, two : 2, three : 3});
equal(numbers.join(', '), '1, 2, 3', 'object flattened into array');

// _.toArray on a NodeList should not throw.
ok(_.isArray(_.toArray(document.childNodes)));
// test in IE < 9
try {
var actual = _.toArray(document.childNodes);
} catch(ex) { }

ok(_.isArray(actual), 'should not throw converting a node list');
});

test('size', function() {
Expand Down

0 comments on commit 17e40e7

Please sign in to comment.