test(helpers): use direct internal seams

This commit is contained in:
Vincent Koc
2026-04-03 23:00:16 +09:00
parent d2427c19e0
commit c1d68f213d
7 changed files with 19 additions and 12 deletions

View File

@@ -1,9 +1,10 @@
export {
createCliRuntimeCapture,
isLiveTestEnabled,
type CliMockOutputRuntime,
type CliRuntimeCapture,
} from "openclaw/plugin-sdk/testing";
isLiveTestEnabled,
} from "../../src/cli/test-runtime-capture.js";
export { isLiveTestEnabled } from "../../src/agents/live-test-helpers.js";
export { type OpenClawConfig } from "openclaw/plugin-sdk/browser-support";
export { expectGeneratedTokenPersistedToGatewayAuth } from "../../src/test-utils/auth-token-assertions.js";
export { withEnv, withEnvAsync } from "../../test/helpers/plugins/env.ts";

View File

@@ -1,6 +1,6 @@
type PathEnvKey = "PATH" | "Path" | "PATHEXT" | "Pathext";
export { createWindowsCmdShimFixture } from "openclaw/plugin-sdk/testing";
export { createWindowsCmdShimFixture } from "../../../src/test-helpers/windows-cmd-shim.js";
const PATH_ENV_KEYS = ["PATH", "Path", "PATHEXT", "Pathext"] as const;

View File

@@ -1 +1 @@
export { installCommonResolveTargetErrorCases } from "openclaw/plugin-sdk/testing";
export { installCommonResolveTargetErrorCases } from "../../src/test-helpers/resolve-target-error-cases.js";

View File

@@ -1 +1 @@
export { createWindowsCmdShimFixture } from "openclaw/plugin-sdk/testing";
export { createWindowsCmdShimFixture } from "../../src/test-helpers/windows-cmd-shim.js";

View File

@@ -1,7 +1,10 @@
import { DEFAULT_MODEL, DEFAULT_PROVIDER } from "openclaw/plugin-sdk/agent-runtime";
import type { PluginRuntime } from "openclaw/plugin-sdk/testing";
import { removeAckReactionAfterReply, shouldAckReaction } from "openclaw/plugin-sdk/testing";
import { vi } from "vitest";
import {
removeAckReactionAfterReply,
shouldAckReaction,
} from "../../../src/channels/ack-reactions.js";
import type { PluginRuntime } from "../../../src/plugins/runtime/types.js";
type DeepPartial<T> = {
[K in keyof T]?: T[K] extends (...args: never[]) => unknown

View File

@@ -1,10 +1,10 @@
import { vi } from "vitest";
import type {
ChannelAccountSnapshot,
ChannelGatewayContext,
OpenClawConfig,
RuntimeEnv,
} from "openclaw/plugin-sdk/testing";
import { vi } from "vitest";
} from "../../../src/channels/plugins/types.js";
import type { OpenClawConfig } from "../../../src/config/config.js";
import type { RuntimeEnv } from "../../../src/runtime.js";
import { createRuntimeEnv } from "./runtime-env.js";
export function createStartAccountContext<TAccount extends { accountId: string }>(params: {

View File

@@ -1,5 +1,8 @@
import type { ChannelAccountSnapshot, ChannelGatewayContext } from "openclaw/plugin-sdk/testing";
import { expect, vi } from "vitest";
import type {
ChannelAccountSnapshot,
ChannelGatewayContext,
} from "../../../src/channels/plugins/types.js";
import { createStartAccountContext } from "./start-account-context.js";
export function startAccountAndTrackLifecycle<TAccount extends { accountId: string }>(params: {