> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sumvin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test your integration

> Run SDK calls in your tests with no network, using fakeFetch from @sumvin/sdk/testing.

export const waitlists = {
  earlyAccess: "",
  payments: "",
  openBanking: "",
  developers: "",
  verifiers: ""
};

<Note>
  **Private preview:** this is rolling out and may not be available on your account yet.{waitlists.earlyAccess ? <> <a href={waitlists.earlyAccess}>Request early access →</a></> : null}
</Note>

`fakeFetch` is the scripted transport the SDK's own tests run on. Give it the responses you want, pass its `fetch` to your client, and read back the requests your code sent.

```ts theme={null}
import { createSumvinClient, listAgentIdentities, sumvinPat } from "@sumvin/sdk";
import { fakeFetch } from "@sumvin/sdk/testing";

const f = fakeFetch([{ status: 200, body: { _links: {}, data: [], offset: 0, limit: 20, total: 0 } }]);

const client = createSumvinClient({
  baseUrl: "https://api.test",
  fetch: f.fetch,
  auth: [sumvinPat("pat_test")],
});

const { error } = await listAgentIdentities({ client });
expect(error).toBeUndefined();
expect(f.last().headers.get("x-sumvin-pat")).toBe("pat_test");
```

Authentication, response validation, error handling and link following all run as they would against the API, so a test can check them end to end.

<Warning>
  `@sumvin/sdk/testing` is for tests only. It is kept out of the main entry point so it can't end up in a production bundle; don't import it from production code.
</Warning>
