mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-28 18:33:37 +00:00
refactor: route provider test seams through extension barrels
This commit is contained in:
1
extensions/brave/test-api.ts
Normal file
1
extensions/brave/test-api.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { __testing } from "./src/brave-web-search-provider.js";
|
||||
1
extensions/moonshot/test-api.ts
Normal file
1
extensions/moonshot/test-api.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { __testing } from "./src/kimi-web-search-provider.js";
|
||||
1
extensions/xai/test-api.ts
Normal file
1
extensions/xai/test-api.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { __testing } from "./src/grok-web-search-provider.js";
|
||||
@@ -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"));
|
||||
});
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user