For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/runtime-api/rstest/index.md.
close
  • English
  • Rstest utility

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

    You can import rs from @rstest/core directly.

    import { rs } from '@rstest/core';
    
    const fn = rs.fn();
    fn.mockResolvedValue('foo');

    The longer rstest helper remains available as an alias.

    import { rstest } from '@rstest/core';
    
    const fn = rstest.fn();
    fn.mockResolvedValue('foo');

    Or, you can access it globally like jest (when globals configuration is enabled).