Skip to content

Commit d851a5e

Browse files
committed
Add clarifying comment for negative indices
1 parent 6d59744 commit d851a5e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/sinon/proxy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var proxyApi = {
4343
getCall: function getCall(index) {
4444
var i = index;
4545
if (i < 0) {
46+
// Negative indices means counting backwards from the last call
4647
i += this.callCount;
4748
}
4849
if (i < 0 || i >= this.callCount) {

0 commit comments

Comments
 (0)