summaryrefslogtreecommitdiff
path: root/tests/testdata/run/058_tasks_microtasks_close.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/run/058_tasks_microtasks_close.ts')
-rw-r--r--tests/testdata/run/058_tasks_microtasks_close.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/testdata/run/058_tasks_microtasks_close.ts b/tests/testdata/run/058_tasks_microtasks_close.ts
new file mode 100644
index 000000000..38e156044
--- /dev/null
+++ b/tests/testdata/run/058_tasks_microtasks_close.ts
@@ -0,0 +1,19 @@
+// deno-lint-ignore-file no-window-prefix
+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");
+});
+window.close();
+console.log("sync 2");
+setTimeout(() => {
+ console.log("setTimeout 2");
+});
+setTimeout(() => {
+ console.log("setTimeout 3");
+}, 100);