Skip to content

Commit a805c80

Browse files
committed
lint + add comments
1 parent 61e4c19 commit a805c80

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

test/image/compare_pixels_test.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,19 @@ function runAll () {
5555
);
5656
});
5757

58-
var BASE_TIMEOUT = 500,
59-
BATCH_SIZE = 5,
58+
var BASE_TIMEOUT = 500, // base timeout time
59+
BATCH_SIZE = 5, // size of each test 'batch'
6060
cnt = 0;
6161

62-
for(var i = 0; i < allMocks.length; i++) {
63-
setTimeout(function() {
64-
testMock(allMocks[cnt++], t);
65-
}, BASE_TIMEOUT * Math.floor(i / BATCH_SIZE) * BATCH_SIZE);
62+
function testFunction() {
63+
testMock(mocks[cnt++], t);
64+
}
65+
6666
t.plan(mocks.length);
6767

68+
for(var i = 0; i < mocks.length; i++) {
69+
setTimeout(testFunction,
70+
BASE_TIMEOUT * Math.floor(i / BATCH_SIZE) * BATCH_SIZE);
6871
}
6972

7073
});

0 commit comments

Comments
 (0)