deno.land / x / lume@v2.1.4 / tests / redirects.test.ts
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253import { assertSiteSnapshot, build, getSite } from "./utils.ts";import redirects from "../plugins/redirects.ts";
Deno.test("redirects plugin", async (t) => { const site = getSite({ src: "redirects", });
site.use(redirects());
await build(site); await assertSiteSnapshot(t, site);});
Deno.test("redirects plugin for netlify", async (t) => { const site = getSite({ src: "redirects", });
site.use(redirects({ output: "netlify", }));
await build(site); await assertSiteSnapshot(t, site);});
Deno.test("redirects plugin for vercel", async (t) => { const site = getSite({ src: "redirects", });
site.use(redirects({ output: "vercel", }));
await build(site); await assertSiteSnapshot(t, site);});
Deno.test("redirects plugin for json", async (t) => { const site = getSite({ src: "redirects", });
site.use(redirects({ output: "json", }));
await build(site); await assertSiteSnapshot(t, site);});
Version Info