added regression test for issue #95

This commit is contained in:
Michael Ficarra
2011-03-04 10:15:48 -05:00
parent 59ef91ee80
commit 1f2c9c5fc1

View File

@@ -4,6 +4,9 @@ $(document).ready(function() {
test("objects: keys", function() {
equals(_.keys({one : 1, two : 2}).join(', '), 'one, two', 'can extract the keys from an object');
// the test above is not safe because it relies on for-in enumeration order
var a = []; a[1] = 0;
equals(_.keys(a).join(', '), '1', 'is not fooled by sparse arrays; see issue #95');
});
test("objects: values", function() {