fix(ci): repair discord interactive test seams

This commit is contained in:
Peter Steinberger
2026-04-03 19:29:07 +01:00
parent 45a6f769bb
commit e5d2181403
2 changed files with 12 additions and 1 deletions

View File

@@ -153,7 +153,7 @@ describe("createDiscordNativeCommand option wiring", () => {
});
it("keeps static choices for non-acp string action arguments", () => {
const command = createNativeCommand("voice");
const command = createNativeCommand("config");
const action = requireOption(command, "action");
const choices = readChoices(action);

View File

@@ -104,6 +104,17 @@ vi.mock("../monitor/agent-components.deps.runtime.js", () => {
};
});
vi.mock("../interactive-dispatch.js", async () => {
const actual = await vi.importActual<typeof import("../interactive-dispatch.js")>(
"../interactive-dispatch.js",
);
return {
...actual,
dispatchDiscordPluginInteractiveHandler: (...args: unknown[]) =>
dispatchPluginInteractiveHandlerMock(...args),
};
});
export function resetDiscordComponentRuntimeMocks() {
dispatchPluginInteractiveHandlerMock.mockReset().mockResolvedValue({
matched: false,