mirror of
https://fastgit.cc/github.com/openclaw/openclaw
synced 2026-05-01 06:36:23 +08:00
test(matrix): speed up CLI metadata entry test
This commit is contained in:
@@ -69,8 +69,7 @@ describe("matrix plugin", () => {
|
||||
expect(entry.setChannelRuntime).toEqual(expect.any(Function));
|
||||
});
|
||||
|
||||
it("registers CLI metadata during discovery registration", () => {
|
||||
const registerChannel = vi.fn();
|
||||
it("wires CLI metadata through the bundled entry", () => {
|
||||
const registerCli = vi.fn();
|
||||
const registerGatewayMethod = vi.fn();
|
||||
const api = createTestPluginApi({
|
||||
@@ -79,15 +78,13 @@ describe("matrix plugin", () => {
|
||||
source: "test",
|
||||
config: {},
|
||||
runtime: {} as never,
|
||||
registrationMode: "discovery",
|
||||
registerChannel,
|
||||
registrationMode: "cli-metadata",
|
||||
registerCli,
|
||||
registerGatewayMethod,
|
||||
});
|
||||
|
||||
entry.register(api);
|
||||
|
||||
expect(registerChannel).toHaveBeenCalledTimes(1);
|
||||
expect(registerCli).toHaveBeenCalledWith(expect.any(Function), {
|
||||
descriptors: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user