chore: Fix types in tests 24/N.

This commit is contained in:
cpojer
2026-02-17 14:30:36 +09:00
parent be5b28cd6b
commit 600022cdcc
11 changed files with 65 additions and 26 deletions

View File

@@ -26,7 +26,13 @@ const loadConfig = getLoadConfigMock();
const readChannelAllowFromStore = getReadChannelAllowFromStoreMock();
function resolveSkillCommands(config: Parameters<typeof listNativeCommandSpecsForConfig>[0]) {
return listSkillCommandsForAgents({ cfg: config });
return (
listSkillCommandsForAgents as unknown as (params: {
cfg: typeof config;
}) => Parameters<typeof listNativeCommandSpecsForConfig>[1]["skillCommands"]
)({
cfg: config,
});
}
const ORIGINAL_TZ = process.env.TZ;
@@ -1111,7 +1117,10 @@ describe("createTelegramBot", () => {
}),
);
// Verify session key does NOT contain :topic:
const sessionKey = enqueueSystemEventSpy.mock.calls[0][1].sessionKey;
const eventOptions = enqueueSystemEventSpy.mock.calls[0]?.[1] as {
sessionKey?: string;
};
const sessionKey = eventOptions.sessionKey ?? "";
expect(sessionKey).not.toContain(":topic:");
});
});