symbi-testing
v1.11.0
Published
Testing utilities and mocks for Symbiont SDK
Readme
symbi-testing
Mocks and test helpers for applications built on the Symbiont JavaScript/TypeScript SDK. Lets you test code that talks to Symbiont without standing up the runtime.
Install
npm install --save-dev symbi-testingUsage
import {
MockFetch,
MockAuthManager,
MockSecretManager,
TestEnvironment,
} from 'symbi-testing';
// Full test harness with mocked auth, secrets, and HTTP
const env = new TestEnvironment({
apiKey: 'test-key',
baseUrl: 'http://mock.symbiont',
});
env.fetch.mockResponse('/api/v1/agents', {
status: 200,
body: [{ id: 'agent-1', name: 'Test Agent' }],
});
const client = env.createClient();
const agents = await client.agents.listAgents();
expect(agents[0].id).toBe('agent-1');
env.fetch.expectCalled('/api/v1/agents', { method: 'GET' });Exports
| Export | Purpose |
|--------|---------|
| MockFetch | Programmable response matcher for HTTP calls |
| MockAuthManager | Bypasses real auth; returns pre-seeded tokens |
| MockSecretManager | In-memory secret store for tests |
| TestEnvironment | Wraps the three above plus a pre-wired SymbiontClient |
| mockData | Realistic fixtures for agents, executions, policies, schedules |
| testHelpers | Assertion + retry + waiting utilities |
See also
symbi-core— main client- SDK README
License
Apache 2.0. See LICENSE.
