test: replace native bridge throw-only assertions · openclaw/openclaw@e3cc2c4
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -67,7 +67,7 @@ describe("sendToNative", () => {
|
67 | 67 | }); |
68 | 68 | |
69 | 69 | it("does nothing outside WebView2", () => { |
70 | | -expect(() => sendToNative({ type: "ready" })).not.toThrow(); |
| 70 | +expect(sendToNative({ type: "ready" })).toBeUndefined(); |
71 | 71 | }); |
72 | 72 | }); |
73 | 73 | |
@@ -94,7 +94,7 @@ describe("initNativeBridge", () => {
|
94 | 94 | const host = makeHost(); |
95 | 95 | const cleanup = initNativeBridge(host); |
96 | 96 | expect(host.handleChatDraftChange).not.toHaveBeenCalled(); |
97 | | -expect(() => cleanup()).not.toThrow(); |
| 97 | +expect(cleanup()).toBeUndefined(); |
98 | 98 | }); |
99 | 99 | |
100 | 100 | it("calls handleChatDraftChange for a valid draft-text message", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。