test(cli): remove duplicate skills verify error case (#123843)

This commit is contained in:
Peter Steinberger
2026-08-14 14:33:48 -07:00
committed by GitHub
parent 4fd825bc0a
commit e7255b9e8c
-18
View File
@@ -1297,24 +1297,6 @@ describe("skills cli commands", () => {
expect(runtimeErrors).toStrictEqual([]);
});
it("fails before fetching when verification target resolution fails", async () => {
resolveClawHubSkillVerificationTargetMock.mockResolvedValueOnce({
ok: false,
error: "Use either --version or --tag.",
});
await expect(
runCommand(["skills", "verify", "agentreceipt", "--version", "1.0.0", "--tag", "latest"]),
).rejects.toThrow("__exit__:1");
expect(JSON.parse(runtimeStdout.at(-1) ?? "{}")).toEqual({
error: "Use either --version or --tag.",
});
expect(runtimeErrors).toStrictEqual([]);
expect(fetchClawHubSkillVerificationMock).not.toHaveBeenCalled();
expect(fetchClawHubSkillCardMock).not.toHaveBeenCalled();
});
it("returns JSON when verify workspace selection fails", async () => {
defaultRuntime.exit.mockImplementationOnce(() => undefined);