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:
@@ -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",
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user