mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 01:34:31 +00:00
test: preload onboarding command modules in hot suites
This commit is contained in:
@@ -8,7 +8,6 @@ import { MINIMAX_API_BASE_URL, MINIMAX_CN_API_BASE_URL } from "./onboard-auth.js
|
||||
import {
|
||||
createThrowingRuntime,
|
||||
readJsonFile,
|
||||
runNonInteractiveOnboardingWithDefaults,
|
||||
type NonInteractiveRuntime,
|
||||
} from "./onboard-non-interactive.test-helpers.js";
|
||||
import { OPENAI_DEFAULT_MODEL } from "./openai-model-default.js";
|
||||
@@ -28,6 +27,15 @@ vi.mock("./onboard-helpers.js", async (importOriginal) => {
|
||||
};
|
||||
});
|
||||
|
||||
const { runNonInteractiveOnboarding } = await import("./onboard-non-interactive.js");
|
||||
|
||||
const NON_INTERACTIVE_DEFAULT_OPTIONS = {
|
||||
nonInteractive: true,
|
||||
skipHealth: true,
|
||||
skipChannels: true,
|
||||
json: true,
|
||||
} as const;
|
||||
|
||||
let ensureAuthProfileStore: typeof import("../agents/auth-profiles.js").ensureAuthProfileStore;
|
||||
let upsertAuthProfile: typeof import("../agents/auth-profiles.js").upsertAuthProfile;
|
||||
|
||||
@@ -95,6 +103,19 @@ async function withOnboardEnv(
|
||||
}
|
||||
}
|
||||
|
||||
async function runNonInteractiveOnboardingWithDefaults(
|
||||
runtime: NonInteractiveRuntime,
|
||||
options: Record<string, unknown>,
|
||||
): Promise<void> {
|
||||
await runNonInteractiveOnboarding(
|
||||
{
|
||||
...NON_INTERACTIVE_DEFAULT_OPTIONS,
|
||||
...options,
|
||||
},
|
||||
runtime,
|
||||
);
|
||||
}
|
||||
|
||||
async function runOnboardingAndReadConfig(
|
||||
env: OnboardEnv,
|
||||
options: Record<string, unknown>,
|
||||
|
||||
Reference in New Issue
Block a user