refactor: route provider test seams through extension barrels

This commit is contained in:
Peter Steinberger
2026-03-27 05:16:50 +00:00
parent 02d9f0d631
commit c7b4c34e89
5 changed files with 8 additions and 5 deletions

View File

@@ -0,0 +1 @@
export { __testing } from "./src/brave-web-search-provider.js";

View File

@@ -0,0 +1 @@
export { __testing } from "./src/kimi-web-search-provider.js";

View File

@@ -0,0 +1 @@
export { __testing } from "./src/grok-web-search-provider.js";

View File

@@ -190,7 +190,7 @@ vi.mock("./subagent-registry-runtime.js", () => subagentRegistryMock);
describe("subagent announce formatting", () => {
let previousFastTestEnv: string | undefined;
let runSubagentAnnounceFlow: (typeof import("./subagent-announce.js"))["runSubagentAnnounceFlow"];
let matrixPlugin: (typeof import("../../extensions/matrix/src/channel.js"))["matrixPlugin"];
let matrixPlugin: (typeof import("../../extensions/matrix/index.js"))["matrixPlugin"];
beforeAll(async () => {
// Set FAST_TEST_MODE before importing the module to ensure the module-level
@@ -199,7 +199,7 @@ describe("subagent announce formatting", () => {
// See: https://github.com/openclaw/openclaw/issues/31298
previousFastTestEnv = process.env.OPENCLAW_TEST_FAST;
process.env.OPENCLAW_TEST_FAST = "1";
({ matrixPlugin } = await import("../../extensions/matrix/src/channel.js"));
({ matrixPlugin } = await import("../../extensions/matrix/index.js"));
({ runSubagentAnnounceFlow } = await import("./subagent-announce.js"));
});

View File

@@ -1,8 +1,8 @@
import { describe, expect, it } from "vitest";
import { __testing as braveTesting } from "../../../extensions/brave/src/brave-web-search-provider.js";
import { __testing as moonshotTesting } from "../../../extensions/moonshot/src/kimi-web-search-provider.js";
import { __testing as braveTesting } from "../../../extensions/brave/test-api.js";
import { __testing as moonshotTesting } from "../../../extensions/moonshot/test-api.js";
import { __testing as perplexityTesting } from "../../../extensions/perplexity/web-search-provider.js";
import { __testing as xaiTesting } from "../../../extensions/xai/src/grok-web-search-provider.js";
import { __testing as xaiTesting } from "../../../extensions/xai/test-api.js";
import {
buildUnsupportedSearchFilterResponse,
mergeScopedSearchConfig,