fix(ci): route extension tests through sdk seams

This commit is contained in:
Vincent Koc
2026-04-03 23:14:35 +09:00
parent ed166ba338
commit ac20eed335
8 changed files with 8 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
import type { MockFn } from "openclaw/plugin-sdk/testing";
import { vi } from "vitest";
import type { MockFn } from "../../../src/test-utils/vitest-mock-fn.js";
export const sendMock: MockFn = vi.fn();
export const reactMock: MockFn = vi.fn();

View File

@@ -1,5 +1,5 @@
import type { MockFn } from "openclaw/plugin-sdk/testing";
import { vi } from "vitest";
import type { MockFn } from "../../../src/test-utils/vitest-mock-fn.js";
type DiscordWebMediaMockFactoryResult = {
loadWebMedia: MockFn;

View File

@@ -6,11 +6,8 @@ export type {
} from "openclaw/plugin-sdk/core";
export { clearAccountEntryFields } from "openclaw/plugin-sdk/core";
export { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
export type { ChannelAccountSnapshot, ChannelGatewayContext } from "openclaw/plugin-sdk/line";
export type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime";
export type {
ChannelAccountSnapshot,
ChannelGatewayContext,
} from "../../src/channels/plugins/types.js";
export type { ChannelStatusIssue } from "openclaw/plugin-sdk/channel-contract";
export {
buildComputedAccountStatusSnapshot,

View File

@@ -9,11 +9,8 @@ export type {
} from "openclaw/plugin-sdk/core";
export { clearAccountEntryFields } from "openclaw/plugin-sdk/core";
export { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
export type { ChannelAccountSnapshot, ChannelGatewayContext } from "openclaw/plugin-sdk/line";
export type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime";
export type {
ChannelAccountSnapshot,
ChannelGatewayContext,
} from "../../src/channels/plugins/types.js";
export type { ChannelStatusIssue } from "openclaw/plugin-sdk/channel-contract";
export type { ChannelSetupDmPolicy, ChannelSetupWizard } from "openclaw/plugin-sdk/setup";
export {

View File

@@ -1,5 +1,5 @@
import type { MockFn } from "openclaw/plugin-sdk/testing";
import { beforeEach, vi } from "vitest";
import type { MockFn } from "../../../src/test-utils/vitest-mock-fn.js";
import type { SignalDaemonExitEvent, SignalDaemonHandle } from "./daemon.js";
type SignalToolResultTestMocks = {

View File

@@ -7,8 +7,8 @@ import {
type MsgContext,
type ReplyPayload,
} from "openclaw/plugin-sdk/reply-runtime";
import type { MockFn } from "openclaw/plugin-sdk/testing";
import { beforeEach, vi } from "vitest";
import type { MockFn } from "../../../src/test-utils/vitest-mock-fn.js";
import type { TelegramBotDeps } from "./bot-deps.js";
type AnyMock = ReturnType<typeof vi.fn>;

View File

@@ -5,8 +5,8 @@ import {
kindFromMime,
normalizePollInput,
} from "openclaw/plugin-sdk/media-runtime";
import type { MockFn } from "openclaw/plugin-sdk/testing";
import { beforeEach, vi } from "vitest";
import type { MockFn } from "../../../src/test-utils/vitest-mock-fn.js";
const { botApi, botCtorSpy } = vi.hoisted(() => ({
botApi: {

View File

@@ -1,5 +1,5 @@
import type { OpenClawConfig } from "openclaw/plugin-sdk/testing";
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../../../src/config/config.js";
export const readConfigFileSnapshotForWrite = vi.fn();
export const writeConfigFile = vi.fn();