import { expect, test, vi } from "vitest"; import { LUCKY_GIFT_OPS_CENTER_PATH, redirectToLuckyGiftOpsCenter, } from "@/features/lucky-gift/pages/LuckyGiftConfigPage.jsx"; test("moves the legacy lucky gift route to the ops-center document entry", () => { const targetLocation = { replace: vi.fn() }; redirectToLuckyGiftOpsCenter(targetLocation); expect(targetLocation.replace).toHaveBeenCalledWith(LUCKY_GIFT_OPS_CENTER_PATH); expect(LUCKY_GIFT_OPS_CENTER_PATH).toBe("/ops-center/?view=configs"); });