mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 01:52:04 +00:00
test: finish no-isolate suite hardening
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { createEmptyPluginRegistry } from "../plugins/registry.js";
|
||||
import { setActivePluginRegistry } from "../plugins/runtime.js";
|
||||
import { generateImage, listRuntimeImageGenerationProviders } from "./runtime.js";
|
||||
import { vi } from "vitest";
|
||||
|
||||
let generateImage: typeof import("./runtime.js").generateImage;
|
||||
let listRuntimeImageGenerationProviders: typeof import("./runtime.js").listRuntimeImageGenerationProviders;
|
||||
|
||||
describe("image-generation runtime helpers", () => {
|
||||
afterEach(() => {
|
||||
setActivePluginRegistry(createEmptyPluginRegistry());
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
vi.resetModules();
|
||||
({ generateImage, listRuntimeImageGenerationProviders } = await import("./runtime.js"));
|
||||
});
|
||||
|
||||
it("generates images through the active image-generation registry", async () => {
|
||||
const pluginRegistry = createEmptyPluginRegistry();
|
||||
const authStore = { version: 1, profiles: {} } as const;
|
||||
|
||||
Reference in New Issue
Block a user