refactor: share extension deferred and runtime helpers

This commit is contained in:
Peter Steinberger
2026-03-14 02:16:19 +00:00
parent 1ac4bac8b1
commit 6a61d5504c
8 changed files with 38 additions and 41 deletions

View File

@@ -1,5 +1,6 @@
import type { RuntimeEnv, WizardPrompter } from "openclaw/plugin-sdk/irc";
import { describe, expect, it, vi } from "vitest";
import { createRuntimeEnv } from "../../test-utils/runtime-env.js";
import { ircOnboardingAdapter } from "./onboarding.js";
import type { CoreConfig } from "./types.js";
@@ -63,13 +64,7 @@ describe("irc onboarding", () => {
}),
});
const runtime: RuntimeEnv = {
log: vi.fn(),
error: vi.fn(),
exit: vi.fn((code: number): never => {
throw new Error(`exit ${code}`);
}),
};
const runtime: RuntimeEnv = createRuntimeEnv();
const result = await ircOnboardingAdapter.configure({
cfg: {} as CoreConfig,