> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# update

- **Type:** `boolean`
- **Default:** `false`
- **CLI:** `-u`, `--update`

Update snapshot.

When `update` is enabled, Rstest will update all changed snapshots and delete obsolete ones.

It should be noted that when you test in local, the newly added snapshot will be automatically updated regardless of whether the `update` configuration is enabled.


**CLI**

```bash
npx rstest -u
```


**rstest.config.ts**

```ts
import { defineConfig } from '@rstest/core';

export default defineConfig({
  update: true,
});
```

