Skip to content

Commit 20b9a19

Browse files
committed
test(extensions): fix bundled lint fallout
1 parent 8c58b5d commit 20b9a19

4 files changed

Lines changed: 16 additions & 8 deletions

File tree

extensions/feishu/runtime-api.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export type {
1818
ReplyPayload,
1919
} from "openclaw/plugin-sdk/core";
2020
export type { OpenClawConfig as ClawdbotConfig } from "openclaw/plugin-sdk/core";
21-
export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime";
21+
export type RuntimeEnv = {
22+
log: (...args: unknown[]) => void;
23+
error: (...args: unknown[]) => void;
24+
exit: (code: number) => void;
25+
};
2226
export type { GroupToolPolicyConfig } from "openclaw/plugin-sdk/config-contracts";
2327
export {
2428
DEFAULT_ACCOUNT_ID,

extensions/feishu/src/monitor-state-runtime-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime";
1+
export type { RuntimeEnv } from "../runtime-api.js";
22
export {
33
createFixedWindowRateLimiter,
44
createWebhookAnomalyTracker,

extensions/whatsapp/src/inbound.media.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,11 @@ vi.mock("openclaw/plugin-sdk/media-store", async () => {
141141
});
142142

143143
vi.mock("./runtime.js", async () => {
144-
const { createChannelIngressQueueForTests: createChannelIngressQueue } = await vi.importActual<
145-
typeof import("openclaw/plugin-sdk/plugin-state-test-runtime")
146-
>("openclaw/plugin-sdk/plugin-state-test-runtime");
144+
const { createChannelIngressQueueForTests: createChannelIngressQueue } = await Promise.resolve(
145+
vi.importActual<typeof import("openclaw/plugin-sdk/plugin-state-test-runtime")>(
146+
"openclaw/plugin-sdk/plugin-state-test-runtime",
147+
),
148+
);
147149
const stateDir = `/tmp/openclaw-whatsapp-inbound-media-${Date.now()}-${Math.random()}`;
148150
return {
149151
getOptionalWhatsAppRuntime: () => undefined,

extensions/whatsapp/src/monitor-inbox.test-harness.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,11 @@ vi.mock("openclaw/plugin-sdk/channel-activity-runtime", async () => {
136136
});
137137

138138
vi.mock("./runtime.js", async () => {
139-
const { createChannelIngressQueueForTests: createChannelIngressQueue } = await vi.importActual<
140-
typeof import("openclaw/plugin-sdk/plugin-state-test-runtime")
141-
>("openclaw/plugin-sdk/plugin-state-test-runtime");
139+
const { createChannelIngressQueueForTests: createChannelIngressQueue } = await Promise.resolve(
140+
vi.importActual<typeof import("openclaw/plugin-sdk/plugin-state-test-runtime")>(
141+
"openclaw/plugin-sdk/plugin-state-test-runtime",
142+
),
143+
);
142144
return {
143145
getWhatsAppRuntime: () => ({
144146
state: {

0 commit comments

Comments
 (0)