spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / tests / fixtures / backend-of / backend-host-of.ts
20 lines · 606 BRaw
1import type Backend from '../../../hooks/backend'
2
3/**
4 * A backend host around one runner: every other member answers nothing (no
5 * file, no mtime, no listing, time zero, a base callback that ignores).
6 *
7 * @param run the host's runner
8 * @returns the host
9 */
10export const backendHostOf = (
11 run: Backend.BackendHost['run'],
12): Backend.BackendHost => ({
13 run,
14 readFile: () => Promise.reject(new Error('ENOENT')),
15 mtimeOf: () => Promise.resolve(null),
16 entryKindsOf: () => Promise.resolve(null),
17 nowMs: () => Promise.resolve(0),
18 sessionStartMsOf: () => 0,
19 onBranchBase: () => undefined,
20})