@tencildev/testing
v0.2.0
Published
Test doubles for Tencil: a fake provider, a fake T3 Code server and a fake Claude Agent SDK.
Readme
@tencildev/testing
Test doubles for Tencil and code built on its bridge.
npm install --save-dev @tencildev/testingFakeAgentProvider: aProviderthat answers instantly and records every call. Push agent messages and status into a watched thread throughsinks.FakeT3Server: a stand-in T3 Code server (auth endpoints and the RPC WebSocket) that simulates streamed agent turns.FakeAgentSdk: a stand-in for@anthropic-ai/claude-agent-sdk.FakeRegistry: a stand-in npm registry that answers Tencil'slatestversion.waitFor: poll until a condition holds.
import { Bridge, MemoryThreadStore, ProjectProviders } from '@tencildev/bridge';
import { FakeAgentProvider } from '@tencildev/testing';
const provider = new FakeAgentProvider();
const bridge = new Bridge({
providers: ProjectProviders.of(provider),
store: new MemoryThreadStore(),
project: { name: 'acme', root: '/acme' },
version: '0',
});