Skip to content

Commit 364ab46

Browse files
committed
add a test to ensure that the ObjectRange.each interator function in passed the index parameter
1 parent ecacc02 commit 364ab46

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/unit/range_test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ new Test.Unit.Runner({
2727
});
2828

2929
this.assertEnumEqual([0, 1, 2, 3], results);
30+
31+
results = [];
32+
$R(2, 4, true).each(function(value, index) {
33+
results.push(index);
34+
});
35+
this.assertEnumEqual([0, 1], results);
36+
3037
},
3138

3239
testAny: function() {

0 commit comments

Comments
 (0)