You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only way the tests pass while the onFulfilled and onRejected functions are not invoked synchronously is when the onFulfilled and onRejected functions are delayed specifically with queueMicrotask.
The only way the tests pass while the
onFulfilled
andonRejected
functions are not invoked synchronously is when theonFulfilled
andonRejected
functions are delayed specifically withqueueMicrotask
.While the linked spec for the exercise doesn't specifically mention
queueMicrotask
instead it mentions:setTimeout
,setImmediate
,proccess.nextTick
which by the spec are valid ways of making sureonFulfilled
andonRejected
are not called synchronously:https://promisesaplus.com/#point-67:~:text=Here%20%E2%80%9Cplatform%20code,handlers%20are%20called.
promises-training/src/tests/foundation/promise.test.ts
Lines 60 to 61 in 58d11d3
promises-training/src/tests/foundation/promise.test.ts
Lines 95 to 100 in 58d11d3
The text was updated successfully, but these errors were encountered: