test: clarify ui gateway no throw assertions · openclaw/openclaw@d16fff1
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -249,7 +249,7 @@ describe("gateway auth", () => {
|
249 | 249 | }); |
250 | 250 | }); |
251 | 251 | |
252 | | -it("does not throw when req is missing socket", async () => { |
| 252 | +it("authorizes matching token auth when req is missing socket", async () => { |
253 | 253 | const res = await authorizeGatewayConnect({ |
254 | 254 | auth: { mode: "token", token: "secret", allowTailscale: false }, |
255 | 255 | connectAuth: { token: "secret" }, |
@@ -550,12 +550,12 @@ describe("gateway auth", () => {
|
550 | 550 | }); |
551 | 551 | |
552 | 552 | expect(auth.password).toBe("env-password"); |
553 | | -expect(() => |
| 553 | +expect( |
554 | 554 | assertGatewayAuthConfigured(auth, { |
555 | 555 | mode: "password", |
556 | 556 | password: rawPasswordRef, |
557 | 557 | }), |
558 | | -).not.toThrow(); |
| 558 | +).toBeUndefined(); |
559 | 559 | }); |
560 | 560 | |
561 | 561 | it("throws generic error when password mode has no password at all", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。