mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-24 16:32:29 +00:00
refactor(test): dedupe setup wizard helpers
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { runSetupWizardFinalize } from "../../test/helpers/extensions/setup-wizard.js";
|
||||
import { createOptionalChannelSetupSurface } from "./channel-setup.js";
|
||||
|
||||
describe("createOptionalChannelSetupSurface", () => {
|
||||
@@ -21,17 +22,13 @@ describe("createOptionalChannelSetupSurface", () => {
|
||||
expect(setup.setupWizard.channel).toBe("example");
|
||||
expect(setup.setupWizard.status.unconfiguredHint).toContain("/channels/example");
|
||||
await expect(
|
||||
setup.setupWizard.finalize?.({
|
||||
cfg: {},
|
||||
accountId: "default",
|
||||
credentialValues: {},
|
||||
runSetupWizardFinalize({
|
||||
finalize: setup.setupWizard.finalize,
|
||||
runtime: {
|
||||
log: () => {},
|
||||
error: () => {},
|
||||
exit: async () => {},
|
||||
},
|
||||
prompter: {} as never,
|
||||
forceAllowFrom: false,
|
||||
}),
|
||||
).rejects.toThrow("@openclaw/example");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user