runAgentConformance

Checks, under Vitest, that a session satisfies the contract <chat> renders from: the required members, the snapshot's shape, stability and freezing, subscription and disposal. Pass a factory for the session your provideAgent({ createSession }) creates.

import { runAgentConformance } from '@threadplane/angular/chat/testing';

Declaration · overload 1

export declare function runAgentConformance(label: string, factory: () => AgentSession | Promise<AgentSession>): void;

Parameters

label · required
string
factory · required
() => AgentSession | Promise<AgentSession>

Returns

void

Examples

runAgentConformance('my backend', () => createSession({ apiUrl: '/agent' }));