import { vi } from "vitest"; import type { Mock } from "vitest"; import type { Notifications } from "@webiny/app-admin/features/notifications/abstractions.js"; // The admin notification queue as a fake: every method a vitest mock, so tests read its calls. export interface FakeNotifications extends Notifications.Interface { notify: Mock; success: Mock; warning: Mock; error: Mock; getNotifications: Mock; remove: Mock; } export const createFakeNotifications = (): FakeNotifications => { return { notify: vi.fn(), success: vi.fn(), warning: vi.fn(), error: vi.fn(), getNotifications: vi.fn().mockReturnValue([]), remove: vi.fn() }; };