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 / old-files.ts
18 lines · 459 BRaw
1import type { On } from 'claude-code'
2
3/**
4 * Answers `$.fs` over /work holding MOVED_IN's two files, both last
5 * written at time 0, before any session began.
6 *
7 * @param on the test's `on`
8 */
9export function oldFiles(on: On) {
10 on('fs.list', () => ({
11 value: [
12 { name: 'old.ts', kind: 'file', size: 2 },
13 { name: 'moved.ts', kind: 'file', size: 2 },
14 ],
15 }))
16
17 on('fs.stat', () => ({ value: { kind: 'file', size: 2, mtimeMs: 0 } }))
18}