mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 07:10:53 +00:00
test: require outbound contract hooks
This commit is contained in:
@@ -51,7 +51,10 @@ describe("opencode provider plugin", () => {
|
||||
name: "OpenCode Zen Provider",
|
||||
});
|
||||
const provider = requireRegisteredProvider(providers, "opencode");
|
||||
const resolveThinkingProfile = provider.resolveThinkingProfile!;
|
||||
const resolveThinkingProfile = provider.resolveThinkingProfile;
|
||||
if (!resolveThinkingProfile) {
|
||||
throw new Error("Expected OpenCode provider resolveThinkingProfile");
|
||||
}
|
||||
|
||||
expect(
|
||||
resolveThinkingProfile({
|
||||
|
||||
@@ -22,8 +22,12 @@ function createDirectTextMediaHarness(params: OutboundPayloadHarnessParams) {
|
||||
text: "",
|
||||
payload: params.payload,
|
||||
};
|
||||
const sendPayload = outbound.sendPayload;
|
||||
if (!sendPayload) {
|
||||
throw new Error("Expected direct text/media outbound sendPayload");
|
||||
}
|
||||
return {
|
||||
run: async () => await outbound.sendPayload!(ctx),
|
||||
run: async () => await sendPayload(ctx),
|
||||
sendMock: sendFn,
|
||||
to: ctx.to,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user