MIRROR: javascript for 馃悳's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 19 lines 410 B view raw
1let events = []; 2 3Promise.resolve().then(() => { 4 events.push("outer"); 5 Promise.resolve().then(() => { 6 events.push("inner"); 7 }); 8}); 9 10setTimeout(() => { 11 events.push("timer"); 12 console.log(events.join(",")); 13 14 if (events.join(",") === "outer,inner,timer") { 15 console.log("OK nested microtasks drain before timers"); 16 } else { 17 console.log("FAIL nested microtasks order changed"); 18 } 19}, 0);