fix: update config candidate ordering test (#4407) (thanks @manikv12)

This commit is contained in:
Peter Steinberger 2026-01-30 07:17:03 +01:00
parent a3ebc4bc39
commit 6bd9823ed7
2 changed files with 7 additions and 2 deletions

View File

@ -42,6 +42,7 @@ Status: stable.
- Routing: precompile session key regexes. (#1697) Thanks @Ray0907.
- CLI: use Node's module compile cache for faster startup. (#2808) Thanks @pi0.
- Auth: show copyable Google auth URL after ASCII prompt. (#1787) Thanks @robbyczgw-cla.
- Agents: add Kimi K2.5 to the synthetic model catalog. (#4407) Thanks @manikv12.
- TUI: avoid width overflow when rendering selection lists. (#1686) Thanks @mossein.
- macOS: finish OpenClaw app rename for macOS sources, bundle identifiers, and shared kit paths. (#2844) Thanks @fal3.
- Branding: update launchd labels, mobile bundle IDs, and logging subsystems to bot.molt (legacy com.clawdbot migrations). Thanks @thewilloftheshadow.

View File

@ -48,8 +48,12 @@ describe("state + config path candidates", () => {
it("orders default config candidates in a stable order", () => {
const home = "/home/test";
const candidates = resolveDefaultConfigCandidates({} as NodeJS.ProcessEnv, () => home);
expect(candidates[0]).toBe(path.join(home, ".openclaw", "openclaw.json"));
expect(candidates).toHaveLength(1);
const expectedDirs = [".openclaw", ".clawdbot", ".moltbot", ".moldbot"];
const expectedFiles = ["openclaw.json", "clawdbot.json", "moltbot.json", "moldbot.json"];
const expected = expectedDirs.flatMap((dir) =>
expectedFiles.map((file) => path.join(home, dir, file)),
);
expect(candidates).toEqual(expected);
});
it("prefers ~/.openclaw when it exists and legacy dir is missing", async () => {