1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00
denoland-deno/tests/testdata/run/058_tasks_microtasks_close.ts

20 lines
429 B
TypeScript
Raw Normal View History

// deno-lint-ignore-file no-window-prefix
2020-03-24 23:56:40 -04:00
console.log("sync 1");
setTimeout(() => {
console.log("setTimeout 1");
Promise.resolve().then(() => {
console.log("Promise resolve in setTimeout 1");
});
});
Promise.resolve().then(() => {
console.log("promise 1");
});
globalThis.close();
2020-03-24 23:56:40 -04:00
console.log("sync 2");
setTimeout(() => {
console.log("setTimeout 2");
});
setTimeout(() => {
console.log("setTimeout 3");
}, 100);