The key output order is executor -> value. The executor runs synchronously; `.then` runs later as a microtask.
A later .then receives the wrong value, an error appears in a surprising place, or a batch fails differently than expected. Promise wrappers often do setup immediately, even before any `.then` callback.
Thinking the whole promise body is async.
Return or await the promise chain so values and failures move through the flow intentionally.
return doWork() .then((value) => nextStep(value)) .catch(handleError);
The console lane proves the visible order: executor -> value. The active line and queues show why source order changed.
Write a focused unit test that asserts the resolved value or rejected path, then verify every branch returns or awaits its work.
Related cases
Continue with nearby confusion while the mental model is fresh.
Was this clear?
This stays local for now. It helps you track where the product still needs sharper cases.