Skip to content

Commit 9ee0fa7

Browse files
authored
Merge pull request #6090 from davepagurek/fix/flaky-gif-test
Make gif test less flaky
2 parents 026ea70 + bcef8c9 commit 9ee0fa7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/unit/image/loading.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,12 @@ suite('loading images', function() {
129129

130130
// This gif has frames that are around for 100ms each.
131131
// After 100ms has elapsed, the display index should
132-
// increment when we draw the image. We'll wait a little
133-
// longer to make sure p5 knows it should be on the next
134-
// image.
135-
return wait(110);
132+
// increment when we draw the image.
133+
return wait(100);
134+
}).then(function() {
135+
return new Promise(function(resolve) {
136+
window.requestAnimationFrame(resolve);
137+
});
136138
}).then(function() {
137139
myp5.image(img, 0, 0);
138140
assert.equal(img.gifProperties.displayIndex, 1);

0 commit comments

Comments
 (0)