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

# Rstest utility

Rstest provides utility functions to help you out through its `rs` helper.

You can import `rs` from `@rstest/core` directly.

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

const fn = rs.fn();
fn.mockResolvedValue('foo');
```

The longer `rstest` helper remains available as an alias.

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

const fn = rstest.fn();
fn.mockResolvedValue('foo');
```

Or, you can access it globally like `jest` (when [globals](/config/test/globals.md) configuration is enabled).
