MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / createMockConfig

Function createMockConfig

packages/kilo-chat/test/client.test.ts:6–13  ·  view source on GitHub ↗
(fetchFn: typeof globalThis.fetch)

Source from the content-addressed store, hash-verified

4import { RequestDeadlineError } from '@kilocode/event-service';
5import type { KiloChatClientConfig } from '../src/types';
6
7function createMockConfig(fetchFn: typeof globalThis.fetch): KiloChatClientConfig {
8 return {
9 eventService: { on: vi.fn(() => () => {}) } as unknown as KiloChatClientConfig['eventService'],
10 baseUrl: 'https://chat.example.com',
11 getToken: vi.fn().mockResolvedValue('test-token'),
12 fetch: fetchFn,
13 };
14}
15
16function mockFetch(status: number, body: unknown): typeof globalThis.fetch {

Callers 1

client.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected