mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
test(plugin-sdk): satisfy tool payload carrier typing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { extractToolPayload } from "./tool-payload.js";
|
||||
import { extractToolPayload, type ToolPayloadCarrier } from "./tool-payload.js";
|
||||
|
||||
describe("extractToolPayload", () => {
|
||||
it("returns undefined for missing results", () => {
|
||||
@@ -39,7 +39,7 @@ describe("extractToolPayload", () => {
|
||||
}),
|
||||
).toBe(content);
|
||||
|
||||
const result = { status: "ok" };
|
||||
const result = { status: "ok" } as ToolPayloadCarrier & { status: string };
|
||||
expect(extractToolPayload(result)).toBe(result);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user