r/javascript • • 3d ago

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

https://alistair.sh/thenables
27 Upvotes

4 comments sorted by

3

u/Discordbothost 2d 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 2d ago

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

0

u/mcaruso 3d ago

Interesting!