test(coding-agent): updated fixtures with missing ui and context mocks

- Added `setEagerNativeScrollbackRebuild` mock to `ui` objects in test fixtures.
- Added `pendingTools` map to context fixtures missing it.
This commit is contained in:
can1357
2026-06-01 14:42:58 +02:00
parent 0c6c6fb92f
commit e78b66fc6f
4 changed files with 6 additions and 4 deletions
@@ -55,7 +55,7 @@ function createFixture(opts: {
const ctx = {
isInitialized: true,
init: vi.fn(async () => {}),
ui: { requestRender },
ui: { requestRender, setEagerNativeScrollbackRebuild: vi.fn() },
statusLine: { invalidate: vi.fn() },
updateEditorTopBorder: vi.fn(),
streamingComponent,
@@ -463,11 +463,12 @@ function createEventControllerFixtureForE10() {
const ctx = {
isInitialized: true,
init: vi.fn(async () => {}),
ui: { requestRender },
ui: { requestRender, setEagerNativeScrollbackRebuild: vi.fn() },
statusLine: { invalidate: vi.fn() },
updateEditorTopBorder: vi.fn(),
addMessageToChat,
updatePendingMessagesDisplay,
pendingTools: new Map(),
session: {},
} as unknown as InteractiveModeContext;
@@ -54,7 +54,7 @@ describe("EventController idle compaction teardown", () => {
streamingMessage: undefined,
pendingTools: new Map<string, unknown>(),
flushPendingModelSwitch: async () => {},
ui: { requestRender: vi.fn() },
ui: { requestRender: vi.fn(), setEagerNativeScrollbackRebuild: vi.fn() },
chatContainer: { removeChild: vi.fn() },
statusContainer: { clear: vi.fn() },
statusLine: { invalidate: vi.fn() },
@@ -39,7 +39,7 @@ function createContext(options: {
isInitialized: true,
statusLine: { invalidate: vi.fn() },
updateEditorTopBorder: vi.fn(),
ui: { requestRender: vi.fn() },
ui: { requestRender: vi.fn(), setEagerNativeScrollbackRebuild: vi.fn() },
editor,
addMessageToChat,
updatePendingMessagesDisplay,
@@ -52,6 +52,7 @@ function createContext(options: {
.join(""),
optimisticUserMessageSignature: options.optimisticSignature,
locallySubmittedUserSignatures: new Set<string>(options.locallySubmittedSignatures ?? []),
pendingTools: new Map(),
} as unknown as InteractiveModeContext;
return { ctx, editor, setText, addMessageToChat, updatePendingMessagesDisplay };
}