mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Merge /master into /no-chain
Former-commit-id: fcef4ca54be1907762e92ee528b650bea9759c1d
This commit is contained in:
13
test/test.js
13
test/test.js
@@ -1782,6 +1782,19 @@
|
||||
deepEqual(_.toArray('abc'), ['a', 'b', 'c']);
|
||||
deepEqual(_.toArray(Object('abc')), ['a', 'b', 'c']);
|
||||
});
|
||||
|
||||
test('should work with a NodeList for `collection` (test in IE < 9)', function() {
|
||||
if (window.document) {
|
||||
try {
|
||||
var nodeList = document.getElementsByTagName('body'),
|
||||
body = nodeList[0],
|
||||
actual = _.toArray(nodeList);
|
||||
} catch(e) { }
|
||||
deepEqual(actual, [body]);
|
||||
} else {
|
||||
skipTest();
|
||||
}
|
||||
});
|
||||
}(1, 2, 3));
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user