MCPcopy Create free account
hub / github.com/callstack/agent-device / assertRejectsRequestCanceled

Function assertRejectsRequestCanceled

src/utils/__tests__/exec.test.ts:195–204  ·  view source on GitHub ↗
(promise: Promise<unknown>)

Source from the content-addressed store, hash-verified

193});
194
195async function assertRejectsRequestCanceled(promise: Promise<unknown>): Promise<void> {
196 await assert.rejects(promise, (error: unknown) => {
197 const err = error as { code?: string; message?: string; details?: Record<string, unknown> };
198 return (
199 err?.code === 'COMMAND_FAILED' &&
200 err.message === 'request canceled' &&
201 err.details?.reason === 'request_canceled'
202 );
203 });
204}
205
206test('whichCmd resolves bare commands from PATH', async () => {
207 assert.equal(await whichCmd('node'), true);

Callers 1

exec.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…