Skip to content

Commit

Permalink
Fix wait_tasks option not being respected
Browse files Browse the repository at this point in the history
  • Loading branch information
triskweline committed Jan 8, 2024
1 parent e769421 commit 992964a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/capybara-lockstep/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ window.CapybaraLockstep = (function() {

function afterWaitTasks(fn, tasksLeft = waitTasks) {
if (tasksLeft > 0) {
afterWaitTasks(fn, tasksLeft - 1)
// Wait 1 task and recurse
setTimeout(function() {
afterWaitTasks(fn, tasksLeft - 1)
})
} else {
fn()
}
Expand Down

0 comments on commit 992964a

Please sign in to comment.