Fix CI plugin SDK test type

This commit is contained in:
Haitao Pan 2026-05-05 11:16:21 +08:00
parent 05f609f391
commit bba99cd970

View File

@ -1,14 +1,16 @@
import type { GatewayRequestHandler, OpenClawPluginApi } from "openclaw/plugin-sdk";
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
import { describe, expect, it } from "vitest";
import register from "./index.js";
type GatewayMethodHandler = Parameters<OpenClawPluginApi["registerGatewayMethod"]>[1];
describe("plugin registration", () => {
it("registers the xworkmate artifact export gateway method", () => {
const methods: Array<{ method: string; handler: GatewayRequestHandler }> = [];
const methods: Array<{ method: string; handler: GatewayMethodHandler }> = [];
const api = {
config: {},
pluginConfig: {},
registerGatewayMethod: (method: string, handler: GatewayRequestHandler) => {
registerGatewayMethod: (method: string, handler: GatewayMethodHandler) => {
methods.push({ method, handler });
},
} as unknown as OpenClawPluginApi;