MCPcopy Create free account
hub / github.com/denoland/std / fn

Function fn

async/delay_test.ts:146–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144Deno.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});

Callers 6

pollFunction · 0.70
safeCallbackFunction · 0.70
tryCallFunction · 0.70
executeMethod · 0.70
retryFunction · 0.70

Calls 9

stubFunction · 0.90
assertRejectsFunction · 0.90
delayFunction · 0.90
assertSpyCallsFunction · 0.90
assertEqualsFunction · 0.90
advanceUntilCompleteFunction · 0.85
stepMethod · 0.45
abortMethod · 0.45

Tested by

no test coverage detected