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

# Client Testing

> How to run and write tests for the Posthoot client

# Testing

We use Jest and React Testing Library for unit/integration tests.

## Setup

* `client/jest.config.js`
* `client/jest.setup.js`

## Run Tests

```bash theme={"dark"}
cd client
pnpm test
```

## Example Test

```tsx theme={"dark"}
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import HomePage from '@/app/page';

test('renders app title', () => {
  render(<HomePage />);
  expect(screen.getByText(/Posthoot/i)).toBeInTheDocument();
});
```

## Tips

* Keep tests fast and deterministic
* Prefer testing behavior over implementation
* Mock network requests
