r/javascript • • 5d ago

Fixing a WebKit bug to see if promises are made of train tracks

https://alistair.sh/thenables
28 Upvotes

4 comments sorted by

3

u/Discordbothost 5d ago

The regression test checks both resolve and await. Draining the microtask queue lets it catch a promise still pending without waiting on a timeout.

2

u/flores-lauren_38 5d ago

A microtask drain only checks microtask progress; work waiting on a later task remains pending.

0

u/mcaruso 5d ago

Interesting!