refactor: split generic plugin test fixtures

This commit is contained in:
Peter Steinberger
2026-04-28 01:21:29 +01:00
parent e508d81f79
commit 56875c4d32
22 changed files with 105 additions and 51 deletions

View File

@@ -3,7 +3,7 @@ export {
expectGeneratedTokenPersistedToGatewayAuth,
type CliMockOutputRuntime,
type CliRuntimeCapture,
} from "openclaw/plugin-sdk/testing";
} from "openclaw/plugin-sdk/test-fixtures";
export {
createTempHomeEnv,
withEnv,

View File

@@ -10,7 +10,7 @@ import {
castAgentMessage,
makeAgentAssistantMessage,
makeAgentUserMessage,
} from "openclaw/plugin-sdk/testing";
} from "openclaw/plugin-sdk/test-fixtures";
import { afterEach, describe, expect, it } from "vitest";
import { mirrorCodexAppServerTranscript } from "./transcript-mirror.js";

View File

@@ -1,8 +1,8 @@
import { describe, expect, it } from "vitest";
import {
createCapturedPluginRegistration,
registerSingleProviderPlugin,
} from "openclaw/plugin-sdk/testing";
} from "openclaw/plugin-sdk/plugin-test-runtime";
import { describe, expect, it } from "vitest";
import deepinfraPlugin from "./index.js";
describe("deepinfra augmentModelCatalog", () => {

View File

@@ -6,7 +6,7 @@ import {
type OpenClawConfig,
resolveAgentModelPrimaryValue,
} from "openclaw/plugin-sdk/provider-onboard";
import { captureEnv } from "openclaw/plugin-sdk/testing";
import { captureEnv } from "openclaw/plugin-sdk/test-env";
import { afterEach, describe, expect, it, vi } from "vitest";
import {
applyDeepInfraProviderConfig,

View File

@@ -1,4 +1,4 @@
import { countLines, hasBalancedFences } from "openclaw/plugin-sdk/testing";
import { countLines, hasBalancedFences } from "openclaw/plugin-sdk/test-fixtures";
import { describe, expect, it } from "vitest";
import { chunkDiscordText, chunkDiscordTextWithMode } from "./chunk.js";

View File

@@ -1,5 +1,5 @@
import { ChannelType, type Guild } from "@buape/carbon";
import { typedCases } from "openclaw/plugin-sdk/testing";
import { typedCases } from "openclaw/plugin-sdk/test-fixtures";
import { beforeEach, describe, expect, it, vi } from "vitest";
import {
allowListMatches,

View File

@@ -2,7 +2,7 @@ import type { ButtonInteraction, ComponentData, StringSelectMenuInteraction } fr
import { ChannelType } from "discord-api-types/v10";
import type { DiscordAccountConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-types";
import { buildAgentSessionKey } from "openclaw/plugin-sdk/routing";
import { peekSystemEvents, resetSystemEventsForTest } from "openclaw/plugin-sdk/testing";
import { peekSystemEvents, resetSystemEventsForTest } from "openclaw/plugin-sdk/test-fixtures";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { expectPairingReplyText } from "../../../../test/helpers/pairing-reply.js";
import {

View File

@@ -1,5 +1,5 @@
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
import { sanitizeTerminalText } from "openclaw/plugin-sdk/testing";
import { sanitizeTerminalText } from "openclaw/plugin-sdk/test-fixtures";
import { describe, expect, it, vi } from "vitest";
import {
describeIMessageEchoDropLog,

View File

@@ -7,7 +7,7 @@ import {
spyRuntimeErrors,
spyRuntimeJson,
spyRuntimeLogs,
} from "openclaw/plugin-sdk/testing";
} from "openclaw/plugin-sdk/test-fixtures";
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { readShortTermRecallEntries, recordShortTermRecalls } from "./short-term-promotion.js";

View File

@@ -3,7 +3,7 @@ import fs from "node:fs/promises";
import net from "node:net";
import os from "node:os";
import path from "node:path";
import { createSandboxTestContext } from "openclaw/plugin-sdk/testing";
import { createSandboxTestContext } from "openclaw/plugin-sdk/test-fixtures";
import { describe, expect, it } from "vitest";
import {
createSandboxBrowserConfig,

View File

@@ -2,7 +2,7 @@ import nodeFs from "node:fs";
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { createSandboxTestContext } from "openclaw/plugin-sdk/testing";
import { createSandboxTestContext } from "openclaw/plugin-sdk/test-fixtures";
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenShellSandboxBackend } from "./backend.js";
import {

View File

@@ -1 +1 @@
export { writeSkill } from "openclaw/plugin-sdk/testing";
export { writeSkill } from "openclaw/plugin-sdk/test-fixtures";