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

Function fakeAbortSignalTimeout

testing/time.ts:201–207  ·  view source on GitHub ↗
(delay: number)

Source from the content-addressed store, hash-verified

199}
200
201function fakeAbortSignalTimeout(delay: number): AbortSignal {
202 const aborter = new AbortController();
203 fakeSetTimeout(() => {
204 aborter.abort(new DOMException("Signal timed out.", "TimeoutError"));
205 }, delay);
206 return aborter.signal;
207}
208
209function overrideGlobals() {
210 globalThis.Date = FakeDate;

Callers

nothing calls this directly

Calls 2

fakeSetTimeoutFunction · 0.85
abortMethod · 0.45

Tested by

no test coverage detected