Skip to content

Guard against fake timers blocking promise resolution #120

Merged
merged 1 commit into from Mar 2, 2013

2 participants

@scothis
The Javascript Architectural Toolkit member
scothis commented Mar 1, 2013

Fake timers are commonly used for testing time related tasks. Next tick
promise resolution can be held up if fake timers are employed until the
timer is advanced. We can avoid this by hoisting a reference to
setTimeout before fake timers are installed. Promise resolution will no
longer be delayed by fake timers.

@scothis scothis Guard against fake timers blocking promise resolution
Fake timers are commonly used for testing time related tasks. Next tick
promise resolution can be held up if fake timers are employed until the
timer is advanced. We can avoid this by hoisting a reference to
setTimeout before fake timers are installed. Promise resolution will no
longer be delayed by fake timers.
9688abe
@briancavalier
The Javascript Architectural Toolkit member

Awesome, thx!

@briancavalier briancavalier merged commit 33ad2f2 into cujojs:dev-200 Mar 2, 2013

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.