mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 07:32:52 +00:00
test: tighten discord model picker data assertion
This commit is contained in:
@@ -810,21 +810,22 @@ describe("Discord model picker interactions", () => {
|
||||
.spyOn(modelPickerModule, "loadDiscordModelPickerData")
|
||||
.mockResolvedValue(pickerData);
|
||||
const interaction = createInteraction({ userId: "owner" });
|
||||
const cfg = {
|
||||
...context.cfg,
|
||||
agents: {
|
||||
defaults: {
|
||||
model: { primary: "anthropic/claude-opus-4-5" },
|
||||
models: {
|
||||
"openai-codex/*": {},
|
||||
"vllm/*": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as OpenClawConfig;
|
||||
|
||||
await replyWithDiscordModelPickerProviders({
|
||||
interaction: interaction as never,
|
||||
cfg: {
|
||||
...context.cfg,
|
||||
agents: {
|
||||
defaults: {
|
||||
model: { primary: "anthropic/claude-opus-4-5" },
|
||||
models: {
|
||||
"openai-codex/*": {},
|
||||
"vllm/*": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as OpenClawConfig,
|
||||
cfg,
|
||||
command: "model",
|
||||
userId: "owner",
|
||||
accountId: context.accountId,
|
||||
@@ -833,7 +834,7 @@ describe("Discord model picker interactions", () => {
|
||||
safeInteractionCall: async (_label, fn) => await fn(),
|
||||
});
|
||||
|
||||
expect(loadSpy).toHaveBeenCalledWith(expect.any(Object), "main");
|
||||
expect(loadSpy).toHaveBeenCalledWith(cfg, "main");
|
||||
const payload = JSON.stringify(interaction.reply.mock.calls[0]?.[0]);
|
||||
expect(payload).toContain("openai-codex");
|
||||
expect(payload).toContain("gpt-5.5-codex");
|
||||
|
||||
Reference in New Issue
Block a user