Rstest provides utility functions to help you out through its rstest helper.
You can import it from @rstest/core directly, and you can also use its alias rs.
import { rstest } from '@rstest/core';
const fn = rstest.fn();
fn.mockResolvedValue('foo');import { rs } from '@rstest/core';
const fn = rs.fn();
fn.mockResolvedValue('foo');Or, you can access it globally like jest (when globals configuration is enabled).