For AI agents: the complete documentation index is available at https://scriptedalchemy.github.io/agent-bundle/zh/llms.txt, the full documentation bundle is available at https://scriptedalchemy.github.io/agent-bundle/zh/llms-full.txt, and this page is available as Markdown at https://scriptedalchemy.github.io/agent-bundle/zh/api/functions/rstest.agentBundleRstest.md.
  • 简体中文
  • Function: agentBundleRstest()

    agentBundleRstest(options?): Promise<AgentBundleRstestConfig>

    Builds the Rstest configuration for a consumer project's route-unit tests.

    One compiler pass runs here — the same preparation the build and inspect use, which owns route-graph compilation — and its manifest configures the pool, the test environment, the TypeScript transform, and the generated route registry the helpers in agent-bundle/test read. No artifact is built.

    The same pass supplies the project identity, so the configuration aliases agent-bundle/meta to a generated module carrying exactly the { name, packageName, packageVersion, version } a build would stamp: any source module importing it loads under the pool instead of raising AB4760. When preparation produced no plugin model there is no identity to stamp, and the aliased module throws AB4760 naming the compiler diagnostics instead of serving the manifest placeholder.

    import { defineConfig } from '@rstest/core';
    import { agentBundleRstest } from 'agent-bundle/rstest';
    
    export default defineConfig(await agentBundleRstest());

    This configuration carries the route-unit level only. Transport, browser, and packed-artifact proof levels arrive as their own configurations.

    Parameters

    options?

    AgentBundleRstestOptions = {}

    Returns

    Promise<AgentBundleRstestConfig>