import { describe, it, expect } from "vitest"; import config from "./next.config"; describe("next.config legacy redirects", () => { it("maps legacy portal URLs to the new routes (non-permanent)", async () => { expect(await config.redirects!()).toEqual([ { source: "/public/member/memberRegistrationform/:code", destination: "/register?ref=:code", permanent: false }, { source: "/public/member/memberRegistrationform", destination: "/register", permanent: false }, { source: "/forgetPassword/form", destination: "/forgot-password", permanent: false }, { source: "/goodie-bag/:id", destination: "/goodie-bag", permanent: false }, ]); }); });