MCPcopy Create free account
hub / github.com/nodejs/node / testCancelableWait2

Function testCancelableWait2

test/parallel/test-timers-promises-scheduler.js:39–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37testCancelableWait1().then(common.mustCall());
38
39async function testCancelableWait2() {
40 const wait = scheduler.wait(10000, { signal: AbortSignal.abort() });
41 await assert.rejects(wait, {
42 code: 'ABORT_ERR',
43 message: 'The operation was aborted',
44 });
45}
46
47testCancelableWait2().then(common.mustCall());
48

Calls 2

abortMethod · 0.65
waitMethod · 0.45

Tested by

no test coverage detected