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
| @@ -72,8 +72,10 @@ | ||
| 72 | 72 | it: `mock.env(on, variables)` for `$.env`, `mock.store(on, entries)` for |
| 73 | 73 | `$.store`, and `mock.clock(on)` for `$.clock`, whose `advance(ms)` resolves |
| 74 | 74 | every wait the mod asked for (`$.clock.sleep`, `after`, `every`) as the clock |
| 75 | -crosses it. `$.ui.press({ plugin, key })` presses a `Button` the test | |
| 76 | -rendered, as a click in the terminal does. | |
| 75 | +crosses it. To see what a dispatch does before it answers, start it | |
| 76 | +unawaited, `await clock.settle()`, then look: the clock stays where it was. | |
| 77 | +`$.ui.press({ plugin, key })` presses a `Button` the test rendered, as a | |
| 78 | +click in the terminal does. | |
| 77 | 79 | |
| 78 | 80 | `tsc -p mods/tsconfig.json` typechecks every mod's hooks and tests against |
| 79 | 81 | `types/` and each mod's own `types/` contract. |
| @@ -24,11 +24,11 @@ | ||
| 24 | 24 | |
| 25 | 25 | const booting = $.session.start(Fixtures.SESSION) |
| 26 | 26 | |
| 27 | - await clock.advance(0) | |
| 27 | + await clock.settle() | |
| 28 | 28 | |
| 29 | 29 | const ran = $.command.run(Fixtures.DIFF) |
| 30 | 30 | |
| 31 | - await clock.advance(0) | |
| 31 | + await clock.settle() | |
| 32 | 32 | |
| 33 | 33 | expect(probes, 'the boot probe, which /diff joined').toHaveLength(1) |
| 34 | 34 | |
| @@ -148,7 +148,7 @@ | ||
| 148 | 148 | element: 'close', |
| 149 | 149 | }) |
| 150 | 150 | |
| 151 | - await world.clock.advance(0) | |
| 151 | + await world.clock.settle() | |
| 152 | 152 | |
| 153 | 153 | expect(world.closed.map(pane => pane.id)).toEqual(['diff']) |
| 154 | 154 | expect(await $.command.run(Fixtures.DIFF)).toEqual({}) |
Large file, diff not shown.