# Building & testing

Run the test suites and build the extension.

## Python

```sh
pip install -e ".[dev]"
pytest
```

`pytest` config lives in `pyproject.toml` (`asyncio_mode = "auto"`,
`testpaths = ["tests"]`). Tests mock network with `respx`.

## Extension

```sh
cd extension
npm install
npm test          # vitest + Testing Library
npm run build     # production build -> extension/dist/
```

| Command | What it does |
|---|---|
| `npm run dev` | `vite build --watch` — rebuilds `dist/` on save, binds no port |
| `npm run build` | one-off production build |

For Load unpacked development: run `npm run dev`, point Chrome at
`extension/dist/`, and after each rebuild use the header **Reload extension**
button (or Reload on `chrome://extensions`). Re-open the side panel if it closed.

## This docs site

```sh
cd website
npm install
npm run dev       # http://localhost:4321
npm run build     # -> website/dist/
npm run check     # astro check
```
