MCPcopy Create free account
hub / github.com/anthropics/claude-code / openWithReadRunning

Function openWithReadRunning

mods/diff/tests/register.test.ts:118–137  ·  view source on GitHub ↗

* Opens the pane with /diff on a changed tree, then leaves a slow read of * it running, as after an edit in a large repository.

(
    $: Engine,
    world: ReturnType<typeof slowGitWorld>,
  )

Source from the content-addressed store, hash-verified

116 * it running, as after an edit in a large repository.
117 */
118 async function openWithReadRunning(
119 $: Engine,
120 world: ReturnType<typeof slowGitWorld>,
121 ) {
122 await $.session.start(Fixtures.SESSION)
123 await $.ui.render(Fixtures.HINT)
124 await $.command.run(Fixtures.DIFF)
125 await world.clock.advance(Fixtures.SETTLE_MS)
126
127 world.slow.isOn = true
128
129 await $.tool.call({
130 tool: 'Edit',
131 file_path: '/work/app.ts',
132 old_string: '1',
133 new_string: '2',
134 })
135
136 await world.clock.advance(Fixtures.SETTLE_MS)
137 }
138
139 const NOTICED = {
140 before: expect.stringContaining('Diff unavailable'),

Callers 1

register.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected