Skip to content

Commit

Permalink
Addition to highcharts#15102, preserve original setTimeout for async …
Browse files Browse the repository at this point in the history
…tests
  • Loading branch information
TorsteinHonsi committed Feb 11, 2021
1 parent 39a26a2 commit be445ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/karma-conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ function createVisualTestTemplate(argv, path, js, assertion) {
// Override setTimeout and animation and stuff for all visual
// samples
var originalSetTimeout = setTimeout;
var clock = TestUtilities.lolexInstall({
now: Date.UTC(2019, 7, 1)
});
Expand All @@ -678,7 +679,7 @@ function createVisualTestTemplate(argv, path, js, assertion) {
`}
assert.test.resets = ${resets};
} else if (attempts < 100) {
setTimeout(waitForChartToLoad, 100);
originalSetTimeout(waitForChartToLoad, 100);
attempts++;
} else {
assert.ok(
Expand Down

0 comments on commit be445ad

Please sign in to comment.