profileShare

rasmusjy / profileshare

Read-only snapshot

No repository description.

main default branch 54 files Expires Sep 13, 2026, 9:06 AM
expiry.test.js 660 bytes
1 import { afterEach, describe, expect, it } from "vitest";
2 import { createShare, makeHarness } from "./helpers.js";
3
4 describe("expiry", () => {
5 let harness;
6 afterEach(() => harness.close());
7
8 it("stops serving content when the link reaches its expiry", async () => {
9 harness = makeHarness();
10 const { id } = await createShare(harness, [101], 1);
11 harness.setNow("2026-07-24T12:00:00.000Z");
12 const page = await harness.agent.get(`/s/${id}`).expect(410);
13 expect(page.text).toContain("The URL you have opened is expired.");
14 expect(page.text).not.toContain("atlas");
15 expect(harness.store.getShare(id).snapshot).toBeNull();
16 });
17 });
18