fix: align 4 failing tests with openclaw -> ironclaw rename
- provider-resolution: expect ironclaw CLI name in error message - telegram bot: expect ironclaw in pairing approve command - run-main.exit: use importOriginal for env.js mock (isTruthyEnvValue) - skills/refresh: match SKILL.md glob patterns instead of bare dirs Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e1201cc7e0
commit
835a36e741
@ -81,8 +81,8 @@ describe("ensureSkillsWatcher", () => {
|
||||
expect(watchMock).toHaveBeenCalledTimes(1);
|
||||
const watchedPaths = watchMock.mock.calls[0]?.[0] as string[];
|
||||
|
||||
// Should include workspace skills, managed skills, and bundled skills
|
||||
expect(watchedPaths).toContain("/tmp/workspace-bundled-test/skills");
|
||||
expect(watchedPaths).toContain("/mock/package/root/skills");
|
||||
// Should include workspace skills and bundled skills (as SKILL.md globs)
|
||||
expect(watchedPaths.some((p) => p.startsWith("/tmp/workspace-bundled-test/skills"))).toBe(true);
|
||||
expect(watchedPaths.some((p) => p.startsWith("/mock/package/root/skills"))).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@ -15,9 +15,13 @@ vi.mock("../infra/dotenv.js", () => ({
|
||||
loadDotEnv: loadDotEnvMock,
|
||||
}));
|
||||
|
||||
vi.mock("../infra/env.js", () => ({
|
||||
normalizeEnv: normalizeEnvMock,
|
||||
}));
|
||||
vi.mock("../infra/env.js", async (importOriginal) => {
|
||||
const actual = await importOriginal();
|
||||
return {
|
||||
...actual,
|
||||
normalizeEnv: normalizeEnvMock,
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock("../infra/path-env.js", () => ({
|
||||
ensureOpenClawCliOnPath: ensurePathMock,
|
||||
|
||||
@ -42,7 +42,7 @@ describe("resolveRequestedLoginProviderOrThrow", () => {
|
||||
expect(() =>
|
||||
resolveRequestedLoginProviderOrThrow(providers, "google-antigravity"),
|
||||
).toThrowError(
|
||||
'Unknown provider "google-antigravity". Loaded providers: google-gemini-cli, qwen-portal. Verify plugins via `openclaw plugins list --json`.',
|
||||
'Unknown provider "google-antigravity". Loaded providers: google-gemini-cli, qwen-portal. Verify plugins via `ironclaw plugins list --json`.',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -274,7 +274,7 @@ describe("createTelegramBot", () => {
|
||||
expect(pairingText).toContain("Your Telegram user id: 999");
|
||||
expect(pairingText).toContain("Pairing code:");
|
||||
expect(pairingText).toContain("PAIRME12");
|
||||
expect(pairingText).toContain("openclaw pairing approve telegram PAIRME12");
|
||||
expect(pairingText).toContain("ironclaw pairing approve telegram PAIRME12");
|
||||
expect(pairingText).not.toContain("<code>");
|
||||
});
|
||||
it("does not resend pairing code when a request is already pending", async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user