mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-19 07:42:04 +00:00
test: use synthetic program status fixtures
This commit is contained in:
parent
969ca8511d
commit
442da01db4
9 changed files with 20 additions and 20 deletions
|
|
@ -53,9 +53,9 @@ describe("buildProgram", () => {
|
|||
mockProcessOutput();
|
||||
createProgramContextMock.mockReturnValue({
|
||||
programVersion: "9.9.9-test",
|
||||
channelOptions: ["telegram"],
|
||||
messageChannelOptions: "telegram",
|
||||
agentChannelOptions: "last|telegram",
|
||||
channelOptions: ["quietchat"],
|
||||
messageChannelOptions: "quietchat",
|
||||
agentChannelOptions: "last|quietchat",
|
||||
} satisfies ProgramContext);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ describe("ensureConfigReady", () => {
|
|||
...makeSnapshot(),
|
||||
exists: true,
|
||||
valid: false,
|
||||
issues: [{ path: "channels.whatsapp", message: "invalid" }],
|
||||
issues: [{ path: "channels.quietchat", message: "invalid" }],
|
||||
...overrides,
|
||||
};
|
||||
readConfigFileSnapshotMock.mockResolvedValue(snapshot);
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ vi.mock("./register.subclis.js", () => ({
|
|||
|
||||
const testProgramContext: ProgramContext = {
|
||||
programVersion: "9.9.9-test",
|
||||
channelOptions: ["telegram"],
|
||||
messageChannelOptions: "telegram",
|
||||
agentChannelOptions: "last|telegram",
|
||||
channelOptions: ["quietchat"],
|
||||
messageChannelOptions: "quietchat",
|
||||
agentChannelOptions: "last|quietchat",
|
||||
};
|
||||
|
||||
describe("configureProgramHelp", () => {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import { getProgramContext, setProgramContext } from "./program-context.js";
|
|||
function makeCtx(version: string): ProgramContext {
|
||||
return {
|
||||
programVersion: version,
|
||||
channelOptions: ["telegram"],
|
||||
messageChannelOptions: "telegram",
|
||||
agentChannelOptions: "last|telegram",
|
||||
channelOptions: ["quietchat"],
|
||||
messageChannelOptions: "quietchat",
|
||||
agentChannelOptions: "last|quietchat",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue