Drop unused error parameter from apiError

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RaRBJFZKSTA7naHGuQHfnQ
This commit is contained in:
2026-07-04 22:25:12 +08:00
co-authored by Claude Fable 5
parent 7095db5ee9
commit c54557c11c
9 changed files with 61 additions and 43 deletions
+23
View File
@@ -0,0 +1,23 @@
// The Lucia project.
// Copyright 2026-2026 DSP, inc. All rights reserved.
// Authors:
// imacat.yang@dsp.im (imacat), 2026/07/04
// AI assistance: Claude Code (Anthropic)
import { describe, it, expect, vi } from "vitest";
import apiError from "@/module/apiError.js";
const toastDefault = vi.fn();
vi.mock("vue-toast-notification", () => ({
useToast: () => ({ default: toastDefault }),
}));
describe("apiError", () => {
it("shows the message as a toast at the bottom", () => {
apiError("some message");
expect(toastDefault).toHaveBeenCalledWith("some message", {
position: "bottom",
});
});
});