deno
265e5f3f - fix(ext/node): run top-level node:test body before post-decl nextTick

Commit
112 days ago
fix(ext/node): run top-level node:test body before post-decl nextTick node:test scheduled its top-level run via setTimeout(0), a macrotask that runs after any process.nextTick / setImmediate callbacks queued by synchronous code following the test() declaration. Node runs a top-level test body before those. Schedule the run via process.nextTick instead: it still lets all synchronous top-level test() calls finish registering, but starts before post-declaration nextTick/setImmediate — matching Node. Closes #35608
Author
Parents
Loading