mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 10:41:23 +00:00
test: stub image provider discovery in generation tool tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
compactWithSafetyTimeout,
|
||||
EMBEDDED_COMPACTION_TIMEOUT_MS,
|
||||
@@ -6,7 +6,13 @@ import {
|
||||
} from "./pi-embedded-runner/compaction-safety-timeout.js";
|
||||
|
||||
describe("compactWithSafetyTimeout", () => {
|
||||
beforeEach(() => {
|
||||
vi.useRealTimers();
|
||||
vi.clearAllTimers();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
vi.clearAllTimers();
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
|
||||
@@ -564,6 +564,7 @@ describe("createImageGenerateTool", () => {
|
||||
});
|
||||
|
||||
it("ignores non-finite mediaMaxMb when loading reference images", async () => {
|
||||
stubImageGenerationProviders();
|
||||
stubEditedImageFlow({ width: 3200, height: 1800 });
|
||||
const tool = requireImageGenerateTool(
|
||||
createImageGenerateTool({
|
||||
|
||||
Reference in New Issue
Block a user