Closed
Description
This example from the documentation (https://nodejs.org/api/process.html#when-to-use-queuemicrotask-vs-processnexttick)
import { nextTick } from 'node:process';
Promise.resolve().then(() => console.log(2));
queueMicrotask(() => console.log(3));
nextTick(() => console.log(1));
// Output:
// 1
// 2
// 3
doesn't work in Windows (node 16.13 and 18.11) and Ubuntu (node 18.11). Actual output is always
2
3
1
This looks like a documentation bug, but any explanation for this behavior in the main module would be appreciated.