MCPcopy Index your code
hub / github.com/github/copilot-sdk / assertFailure

Function assertFailure

nodejs/test/e2e/client_api.e2e.test.ts:21–30  ·  view source on GitHub ↗
(
        action: () => Promise<unknown>,
        expectedMessage: string
    )

Source from the content-addressed store, hash-verified

19 }
20
21 async function assertFailure(
22 action: () => Promise<unknown>,
23 expectedMessage: string
24 ): Promise<void> {
25 await expect(action()).rejects.toSatisfy((err: unknown) => {
26 const text = err instanceof Error ? `${err.message}\n${err.stack ?? ""}` : String(err);
27 expect(text.toLowerCase()).toContain(expectedMessage.toLowerCase());
28 return true;
29 });
30 }
31
32 it("should get null last session id before any sessions exist", async () => {
33 await client.start();

Callers 1

Calls 1

StringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…