test(coding-agent): updated test harnesses for composer shape methods

- Add syncComposerShape and getComposerShapes stubs to test mocks and harnesses.
This commit is contained in:
can1357
2026-08-20 06:38:51 +02:00
parent 184058f11a
commit 1f526ed5d3
3 changed files with 7 additions and 0 deletions
@@ -50,6 +50,7 @@ function makeHarness() {
uiContext = context;
},
addAutocompleteProvider,
syncComposerShape: vi.fn(),
} as unknown as InteractiveModeContext;
const controller = new ExtensionUiController(ctx);
@@ -29,10 +29,12 @@ describe("issue #1020 - ctx.shutdown() in interactive mode", () => {
): void {
capturedContextActions = contextActions;
},
getComposerShapes: () => [],
};
const ctxStub = {
shutdownRequested: false,
syncComposerShape: () => {},
session: {
extensionRunner: fakeExtensionRunner,
// other session fields are only touched lazily by other actions; we
@@ -64,11 +66,13 @@ describe("issue #1020 - ctx.shutdown() in interactive mode", () => {
capturedContextActions = contextActions;
},
onError(_handler: (error: unknown) => void): void {},
getComposerShapes: () => [],
async emit(_event: unknown): Promise<void> {},
};
const ctxStub = {
shutdownRequested: false,
syncComposerShape: () => {},
session: {
extensionRunner: fakeExtensionRunner,
},
@@ -85,6 +85,7 @@ function createHarness(): Harness {
emit: async () => undefined,
getMessageRenderer: () => undefined,
getAssistantThinkingRenderers: () => undefined,
getComposerShapes: () => [],
};
const sessionMock = {
@@ -138,6 +139,7 @@ function createHarness(): Harness {
setWorkingMessage: vi.fn(),
setToolsExpanded: vi.fn(),
toolOutputExpanded: false,
syncComposerShape: vi.fn(),
hideThinkingBlock: false,
showError: vi.fn(),
editor: {