Skip to content

Commit

Permalink
changed while loop to do while
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Webster committed Jun 24, 2024
1 parent af87b09 commit ab72b93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/e2e/samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ async function processSample(page, sample, command) {

await page.goto(`file://${htmlPath}`)

let wait = true;
while (wait) {
let wait;
do {
//Wait for all intervals in the page to have been cleared
await page.waitForFunction(() => window.activeIntervalCount === 0)

Expand All @@ -111,7 +111,7 @@ async function processSample(page, sample, command) {
wait = await page.evaluate(() => {
return !(window.activeIntervalCount === 0 && window.activeTimerCount === 0 && chart.w.globals.animationEnded)
})
}
} while (wait)

// Check that there are no console errors
if (consoleErrors.length > 0) {
Expand Down

0 comments on commit ab72b93

Please sign in to comment.