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:
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user