test: tighten mattermost setup route assertion · openclaw/openclaw@848ad36
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/mattermost/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -243,12 +243,10 @@ describe("mattermost setup", () => {
|
243 | 243 | } |
244 | 244 | |
245 | 245 | expect(registerHttpRoute).toHaveBeenCalledTimes(1); |
246 | | -expect(registerHttpRoute).toHaveBeenCalledWith( |
247 | | -expect.objectContaining({ |
248 | | -path: "/api/channels/mattermost/command", |
249 | | -auth: "plugin", |
250 | | -}), |
251 | | -); |
| 246 | +const [route] = registerHttpRoute.mock.calls[0] ?? []; |
| 247 | +expect(route?.path).toBe("/api/channels/mattermost/command"); |
| 248 | +expect(route?.auth).toBe("plugin"); |
| 249 | +expect(typeof route?.handler).toBe("function"); |
252 | 250 | }); |
253 | 251 | |
254 | 252 | it("treats secret-ref tokens plus base url as configured", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。