test: speed up test suite and trim redundant onboarding tests

This commit is contained in:
Peter Steinberger
2026-02-13 04:30:39 +00:00
parent ac41176532
commit ba7dccc49d
5 changed files with 90 additions and 203 deletions

View File

@@ -19,6 +19,7 @@ const ensureSystemdUserLingerInteractive = vi.hoisted(() => vi.fn(async () => {}
const isSystemdUserServiceAvailable = vi.hoisted(() => vi.fn(async () => true));
const ensureControlUiAssetsBuilt = vi.hoisted(() => vi.fn(async () => ({ ok: true })));
const runTui = vi.hoisted(() => vi.fn(async () => {}));
const setupOnboardingShellCompletion = vi.hoisted(() => vi.fn(async () => {}));
vi.mock("../commands/onboard-channels.js", () => ({
setupChannels,
@@ -73,6 +74,10 @@ vi.mock("../tui/tui.js", () => ({
runTui,
}));
vi.mock("./onboarding.completion.js", () => ({
setupOnboardingShellCompletion,
}));
describe("runOnboardingWizard", () => {
it("exits when config is invalid", async () => {
readConfigFileSnapshot.mockResolvedValueOnce({