> ## 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: "https://sumvin.com/?interest=early_access&utm_source=docs&utm_medium=banner&utm_campaign=early_access#waitlist",
  payments: "https://sumvin.com/?interest=payments&utm_source=docs&utm_medium=banner&utm_campaign=payments#waitlist",
  openBanking: "https://sumvin.com/?interest=open_banking&utm_source=docs&utm_medium=banner&utm_campaign=open_banking#waitlist",
  developers: "https://sumvin.com/developers?interest=cli,agent_plugin&utm_source=docs&utm_medium=banner&utm_campaign=developers#access",
  verifiers: "https://sumvin.com/developers?interest=verifiers&utm_source=docs&utm_medium=banner&utm_campaign=verifiers#access"
};

<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={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.