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

Function drawnRoundMerge

mods/diff/tests/register.test.ts:20–53  ·  view source on GitHub ↗
($: Engine, on: On, finishedMs: number)

Source from the content-addressed store, hash-verified

18
19describe('register', () => {
20 async function drawnRoundMerge($: Engine, on: On, finishedMs: number) {
21 const script = { ...Fixtures.REPOSITORY, 'rev-parse --verify': 'merging' }
22
23 let listing = Fixtures.MERGING.map(([name, kind]): FsEntry => ({
24 name,
25 kind,
26 size: 0,
27 mtimeMs: 0,
28 isLink: false,
29 }))
30
31 on('fs.list', (_engine, e) => {
32 const isGitDir = e.path === '/work/.git'
33
34 return { value: isGitDir ? listing : [] }
35 })
36
37 const world = Fixtures.inRepository(on, script)
38
39 const drawn = async () => Fixtures.textOf(await $.ui.render(Fixtures.PANE))
40
41 await $.session.start(Fixtures.SESSION)
42 await $.command.run(Fixtures.DIFF)
43 await world.clock.advance(finishedMs)
44
45 const before = await drawn()
46
47 listing = []
48 script['rev-parse --verify'] = 'merged'
49
50 await world.clock.advance(Limits.HEAD_POLL_MS + Fixtures.SETTLE_MS)
51
52 return { before, after: await drawn() }
53 }
54
55 /**
56 * A fake session. Each git run answers from the script as it is when the

Callers 1

register.test.tsFile · 0.85

Calls 1

drawnFunction · 0.85

Tested by

no test coverage detected