()
| 144 | Deno.test({ |
| 145 | name: "delay() handles persistent option with error", |
| 146 | async fn() { |
| 147 | using unrefTimer = stub(Deno, "unrefTimer", () => { |
| 148 | throw new TypeError("Error!"); |
| 149 | }); |
| 150 | |
| 151 | await assertRejects( |
| 152 | () => delay(100, { persistent: false }), |
| 153 | TypeError, |
| 154 | "Error!", |
| 155 | ); |
| 156 | |
| 157 | assertSpyCalls(unrefTimer, 1); |
| 158 | }, |
| 159 | sanitizeResources: false, |
| 160 | sanitizeOps: false, |
| 161 | }); |
no test coverage detected