diff --git a/frontend/src/notes/facets.test.ts b/frontend/src/notes/facets.test.ts index 431ed0e..4065755 100644 --- a/frontend/src/notes/facets.test.ts +++ b/frontend/src/notes/facets.test.ts @@ -21,4 +21,8 @@ describe("the board's filter URL", () => { expect(facets).toEqual({}); expect(facetCount(facets)).toBe(0); }); + + it("ignores a shared value it doesn't know", () => { + expect(facetsFromQuery({ shared: "by_me" })).toEqual({}); + }); }); diff --git a/frontend/src/notes/sharing.test.ts b/frontend/src/notes/sharing.test.ts index 20b1c81..dd92144 100644 --- a/frontend/src/notes/sharing.test.ts +++ b/frontend/src/notes/sharing.test.ts @@ -1,7 +1,6 @@ import { describe, expect, it } from "vitest"; import { canEditText, isOwnNote } from "./sharing"; -import { facetCount, facetsFromQuery, facetsToQuery } from "./facets"; import type { Note } from "../stores/notes"; const note = (extra: Partial): Note => ({ ...({} as Note), ...extra }); @@ -21,16 +20,3 @@ describe("how a note is held", () => { expect(canEditText(note({ permission: "view" }))).toBe(false); }); }); - -describe("the Shared with me facet", () => { - it("round-trips through the URL and counts as one filter", () => { - const facets = facetsFromQuery({ shared: "with_me" }); - expect(facets).toEqual({ shared: "with_me" }); - expect(facetsToQuery(facets)).toEqual({ shared: "with_me" }); - expect(facetCount(facets)).toBe(1); - }); - - it("ignores a value it doesn't know", () => { - expect(facetsFromQuery({ shared: "by_me" })).toEqual({}); - }); -});