File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ Deno.test("Scheduler", async (t) => {
66 await t.step(
77 "calls the given asynchronous callback function with the given interval without overlapping",
88 async () => {
9- const controller = new AbortController();
10- const { signal } = controller;
119 let count = 0;
1210 let locked = false;
1311 {
@@ -17,16 +15,15 @@ Deno.test("Scheduler", async (t) => {
1715 throw new Error("Overlapping");
1816 }
1917 locked = true;
20- await delay(100, { signal } );
18+ await delay(100);
2119 count++;
2220 locked = false;
2321 });
24- await delay(900 );
22+ await delay(950 );
2523 }
26- controller.abort();
2724 // ```
2825 // Count 1 2 3 4
29- // -------->=========|--------->=========|--------->=========|--------->=========|---------x
26+ // -------->=========|--------->=========|--------->=========|--------->=========|--------->==== x
3027 // Time 100 200 300 400 500 600 700 800 900
3128 // ```
3229 assertEquals(count, 4);
You can’t perform that action at this time.
0 commit comments