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
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
Those four lines should log respectively 2, Promise { 2 }, Promise { 2 }, and Promise { <pending> }, since it's what their contents complete to (potentially asynchronously).
Whenever a line completes with a promise, Node.js 27 implicitly awaits it. It always prints the contents of the promise rather than the promise itself, and for cases like new Promise(() => {}) it just hangs forever.
Additional information
This bug was also reported years ago (#43777) and it was fixed in Node.js 19 (#43827), but now it's back.
I believe it's caused by #64034. That PR deleted the tests introduced by #43827 (in parallel/test-repl-top-level-await.js), claiming "No need to test TLA — it's supported natively by the inspector".
Activity