We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61e4c19 commit a805c80Copy full SHA for a805c80
test/image/compare_pixels_test.js
@@ -55,16 +55,19 @@ function runAll () {
55
);
56
});
57
58
- var BASE_TIMEOUT = 500,
59
- BATCH_SIZE = 5,
+ var BASE_TIMEOUT = 500, // base timeout time
+ BATCH_SIZE = 5, // size of each test 'batch'
60
cnt = 0;
61
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);
+ function testFunction() {
+ testMock(mocks[cnt++], t);
+ }
+
66
t.plan(mocks.length);
67
68
+ for(var i = 0; i < mocks.length; i++) {
69
+ setTimeout(testFunction,
70
+ BASE_TIMEOUT * Math.floor(i / BATCH_SIZE) * BATCH_SIZE);
71
}
72
73
0 commit comments