test(matrix): speed up CLI metadata entry test · openclaw/openclaw@2b40416
gumadeiras
·
2026-04-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -69,8 +69,7 @@ describe("matrix plugin", () => {
|
69 | 69 | expect(entry.setChannelRuntime).toEqual(expect.any(Function)); |
70 | 70 | }); |
71 | 71 | |
72 | | -it("registers CLI metadata during discovery registration", () => { |
73 | | -const registerChannel = vi.fn(); |
| 72 | +it("wires CLI metadata through the bundled entry", () => { |
74 | 73 | const registerCli = vi.fn(); |
75 | 74 | const registerGatewayMethod = vi.fn(); |
76 | 75 | const api = createTestPluginApi({ |
@@ -79,15 +78,13 @@ describe("matrix plugin", () => {
|
79 | 78 | source: "test", |
80 | 79 | config: {}, |
81 | 80 | runtime: {} as never, |
82 | | -registrationMode: "discovery", |
83 | | - registerChannel, |
| 81 | +registrationMode: "cli-metadata", |
84 | 82 | registerCli, |
85 | 83 | registerGatewayMethod, |
86 | 84 | }); |
87 | 85 | |
88 | 86 | entry.register(api); |
89 | 87 | |
90 | | -expect(registerChannel).toHaveBeenCalledTimes(1); |
91 | 88 | expect(registerCli).toHaveBeenCalledWith(expect.any(Function), { |
92 | 89 | descriptors: [ |
93 | 90 | { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。