Släktträd och tidslinje
Relationer får ett släktband (förälder, partner, syskon) och en period. Nytt släktträd som ritas av släktbanden, och en tidslinje som samlar födelse och död, scenarier, egna händelser och relationsperioder med ålder vid varje tillfälle. Datum skrivs som ÅÅÅÅ, ÅÅÅÅ-MM eller ÅÅÅÅ-MM-DD. Följer med i export, import och papperskorg. Migreringen 0006 ger gamla relationer som "Förälder till" rätt släktband. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dcb5d43429
commit
bd269d70a5
32 files changed
+2285
-25
No files matched your search
@@ -0,0 +1,188 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { familyComponent, layoutFamily, parseBond, NODE_HEIGHT, NODE_WIDTH, GAP_X, type FamilyBondInput, type FamilyLayout, type FamilyPerson } from "@/lib/family";
|
||||
|
||||
const person = (id: string, name = id.toUpperCase()): FamilyPerson => ({ id, name });
|
||||
const parent = (fromId: string, toId: string, ...memberIds: string[]): FamilyBondInput => ({ bond: "PARENT", fromId, toId, memberIds });
|
||||
const partner = (fromId: string, toId: string, ...memberIds: string[]): FamilyBondInput => ({ bond: "PARTNER", fromId, toId, memberIds });
|
||||
const sibling = (fromId: string, toId: string, ...memberIds: string[]): FamilyBondInput => ({ bond: "SIBLING", fromId, toId, memberIds });
|
||||
|
||||
const node = (layout: FamilyLayout, id: string) => layout.nodes.find((n) => n.id === id)!;
|
||||
const centre = (layout: FamilyLayout, id: string) => node(layout, id).x + NODE_WIDTH / 2;
|
||||
|
||||
/** Ingen nod i samma rad överlappar en annan. */
|
||||
function expectNoOverlap(layout: FamilyLayout) {
|
||||
for (const a of layout.nodes) {
|
||||
for (const b of layout.nodes) {
|
||||
if (a.id < b.id && a.y === b.y) expect(Math.abs(a.x - b.x)).toBeGreaterThanOrEqual(NODE_WIDTH + GAP_X - 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
describe("parseBond", () => {
|
||||
it("godtar bara kända släktband", () => {
|
||||
expect(parseBond("PARENT")).toBe("PARENT");
|
||||
expect(parseBond("PARTNER")).toBe("PARTNER");
|
||||
expect(parseBond("SIBLING")).toBe("SIBLING");
|
||||
expect(parseBond("FRIEND")).toBeNull();
|
||||
expect(parseBond(null)).toBeNull();
|
||||
expect(parseBond(undefined)).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("layoutFamily", () => {
|
||||
it("ger tomt resultat utan släktband", () => {
|
||||
expect(layoutFamily([person("a")], [])).toMatchObject({ nodes: [], partners: [], children: [], width: 0, height: 0 });
|
||||
});
|
||||
|
||||
it("lägger barn en generation under föräldern", () => {
|
||||
const layout = layoutFamily([person("mor"), person("barn")], [parent("mor", "barn")]);
|
||||
expect(node(layout, "barn").generation).toBe(1);
|
||||
expect(node(layout, "barn").y).toBeGreaterThan(node(layout, "mor").y);
|
||||
expect(layout.children).toEqual([{ childId: "barn", parentIds: ["mor"] }]);
|
||||
});
|
||||
|
||||
it("ritar partner bredvid varandra i samma rad och barnet mitt under dem", () => {
|
||||
const people = ["far", "mor", "barn"].map((id) => person(id));
|
||||
const layout = layoutFamily(people, [partner("far", "mor"), parent("far", "barn"), parent("mor", "barn")]);
|
||||
|
||||
expect(node(layout, "far").y).toBe(node(layout, "mor").y);
|
||||
expect(Math.abs(node(layout, "far").x - node(layout, "mor").x)).toBe(NODE_WIDTH + GAP_X);
|
||||
expect(layout.partners).toHaveLength(1);
|
||||
expect(centre(layout, "barn")).toBeCloseTo((centre(layout, "far") + centre(layout, "mor")) / 2, 0);
|
||||
expect(layout.children[0].parentIds).toEqual(["far", "mor"]);
|
||||
});
|
||||
|
||||
it("tre generationer, syskon sida vid sida utan överlapp", () => {
|
||||
const people = ["farfar", "far", "mor", "a", "b", "c"].map((id) => person(id));
|
||||
const layout = layoutFamily(people, [
|
||||
parent("farfar", "far"),
|
||||
partner("far", "mor"),
|
||||
parent("far", "a"),
|
||||
parent("far", "b", "c"),
|
||||
parent("mor", "a", "b", "c"),
|
||||
]);
|
||||
expect([node(layout, "farfar").generation, node(layout, "far").generation, node(layout, "a").generation]).toEqual([0, 1, 2]);
|
||||
expect(node(layout, "mor").generation).toBe(1);
|
||||
expect(new Set(["a", "b", "c"].map((id) => node(layout, id).y)).size).toBe(1);
|
||||
expectNoOverlap(layout);
|
||||
// Barnen sitter ihop under föräldrarna
|
||||
const kids = ["a", "b", "c"].map((id) => centre(layout, id));
|
||||
expect(Math.min(...kids)).toBeGreaterThanOrEqual(Math.min(centre(layout, "far"), centre(layout, "mor")) - NODE_WIDTH * 2);
|
||||
});
|
||||
|
||||
it("syskon utan kända föräldrar hamnar i samma generation", () => {
|
||||
const layout = layoutFamily([person("a"), person("b"), person("c")], [sibling("a", "b"), parent("a", "c")]);
|
||||
expect(node(layout, "a").generation).toBe(node(layout, "b").generation);
|
||||
expect(node(layout, "c").generation).toBe(1);
|
||||
});
|
||||
|
||||
it("partner som gifts in följer med sin partners generation", () => {
|
||||
// Anna har föräldrar, Bo har inga. Bo ska hamna i Annas generation, inte överst.
|
||||
const people = ["mormor", "anna", "bo", "barn"].map((id) => person(id));
|
||||
const layout = layoutFamily(people, [parent("mormor", "anna"), partner("anna", "bo"), parent("anna", "barn"), parent("bo", "barn")]);
|
||||
expect(node(layout, "bo").generation).toBe(1);
|
||||
expect(node(layout, "barn").generation).toBe(2);
|
||||
expectNoOverlap(layout);
|
||||
});
|
||||
|
||||
it("två släkter som möts i ett barn", () => {
|
||||
const people = ["a1", "a2", "b1", "b2", "ma", "mb", "barn"].map((id) => person(id));
|
||||
const layout = layoutFamily(people, [
|
||||
parent("a1", "ma"),
|
||||
parent("a2", "ma"),
|
||||
parent("b1", "mb"),
|
||||
parent("b2", "mb"),
|
||||
partner("ma", "mb"),
|
||||
parent("ma", "barn"),
|
||||
parent("mb", "barn"),
|
||||
]);
|
||||
expect(node(layout, "barn").generation).toBe(2);
|
||||
expect(node(layout, "a1").generation).toBe(0);
|
||||
expectNoOverlap(layout);
|
||||
expect(layout.width).toBeGreaterThan(NODE_WIDTH * 4);
|
||||
});
|
||||
|
||||
it("flera partner i en kedja ritas bredvid varandra", () => {
|
||||
const layout = layoutFamily([person("a"), person("b"), person("c")], [partner("a", "b"), partner("b", "c")]);
|
||||
const xs = ["a", "b", "c"].map((id) => node(layout, id).x).sort((p, q) => p - q);
|
||||
expect(xs[1] - xs[0]).toBe(NODE_WIDTH + GAP_X);
|
||||
expect(xs[2] - xs[1]).toBe(NODE_WIDTH + GAP_X);
|
||||
expect(layout.partners).toHaveLength(2);
|
||||
});
|
||||
|
||||
it("partnergrupp med fler än två", () => {
|
||||
const layout = layoutFamily(["a", "b", "c"].map((id) => person(id)), [partner("a", "b", "c")]);
|
||||
expect(layout.nodes).toHaveLength(3);
|
||||
expectNoOverlap(layout);
|
||||
});
|
||||
|
||||
it("cirkulära släktband hänger inte och ger ändå en layout", () => {
|
||||
const layout = layoutFamily(["a", "b", "c"].map((id) => person(id)), [parent("a", "b"), parent("b", "c"), parent("c", "a")]);
|
||||
expect(layout.nodes).toHaveLength(3);
|
||||
expect(layout.nodes.every((n) => Number.isFinite(n.x) && Number.isFinite(n.y))).toBe(true);
|
||||
});
|
||||
|
||||
it("en person som är sin egen förälder ignoreras", () => {
|
||||
const layout = layoutFamily([person("a"), person("b")], [parent("a", "a"), parent("a", "b")]);
|
||||
expect(layout.children).toEqual([{ childId: "b", parentIds: ["a"] }]);
|
||||
});
|
||||
|
||||
it("ignorerar personer som inte finns i listan", () => {
|
||||
const layout = layoutFamily([person("a")], [parent("a", "okänd"), parent("okänd", "a")]);
|
||||
expect(layout.nodes).toEqual([]);
|
||||
});
|
||||
|
||||
it("nodernas läge är inom bilden", () => {
|
||||
const layout = layoutFamily(["a", "b", "c", "d"].map((id) => person(id)), [parent("a", "b"), parent("a", "c"), parent("b", "d")]);
|
||||
for (const n of layout.nodes) {
|
||||
expect(n.x).toBeGreaterThanOrEqual(0);
|
||||
expect(n.y).toBeGreaterThanOrEqual(0);
|
||||
expect(n.x + NODE_WIDTH).toBeLessThanOrEqual(layout.width);
|
||||
expect(n.y + NODE_HEIGHT).toBeLessThanOrEqual(layout.height);
|
||||
}
|
||||
});
|
||||
|
||||
it("samma indata ger samma layout", () => {
|
||||
const people = ["a", "b", "c", "d", "e"].map((id) => person(id));
|
||||
const bonds = [partner("a", "b"), parent("a", "c"), parent("b", "c"), parent("a", "d"), sibling("c", "e")];
|
||||
expect(layoutFamily(people, bonds)).toEqual(layoutFamily([...people].reverse(), bonds));
|
||||
});
|
||||
|
||||
it("klarar en stor släkt snabbt", () => {
|
||||
const people: FamilyPerson[] = [];
|
||||
const bonds: FamilyBondInput[] = [];
|
||||
// 5 generationer, varje person har tre barn
|
||||
let current = ["p0"];
|
||||
people.push(person("p0"));
|
||||
let counter = 1;
|
||||
for (let gen = 0; gen < 5; gen++) {
|
||||
const next: string[] = [];
|
||||
for (const p of current) {
|
||||
for (let i = 0; i < 3; i++) {
|
||||
const id = `p${counter++}`;
|
||||
people.push(person(id));
|
||||
bonds.push(parent(p, id));
|
||||
next.push(id);
|
||||
}
|
||||
}
|
||||
current = next;
|
||||
}
|
||||
const started = Date.now();
|
||||
const layout = layoutFamily(people, bonds);
|
||||
expect(layout.nodes).toHaveLength(people.length);
|
||||
expect(Date.now() - started).toBeLessThan(5000);
|
||||
expectNoOverlap(layout);
|
||||
});
|
||||
});
|
||||
|
||||
describe("familyComponent", () => {
|
||||
it("följer alla släktband åt alla håll", () => {
|
||||
const bonds = [parent("farfar", "far"), partner("far", "mor"), parent("far", "barn"), parent("annan", "annanbarn")];
|
||||
expect([...familyComponent(bonds, "barn")].sort()).toEqual(["barn", "far", "farfar", "mor"]);
|
||||
expect([...familyComponent(bonds, "annanbarn")].sort()).toEqual(["annan", "annanbarn"]);
|
||||
});
|
||||
|
||||
it("en okänd person ger bara sig själv", () => {
|
||||
expect([...familyComponent([parent("a", "b")], "x")]).toEqual(["x"]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,83 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { ageAt, compareStoryDates, normalizeStoryDate, parseStoryDate, storyDateKey, storyYear } from "@/lib/story-date";
|
||||
|
||||
describe("parseStoryDate", () => {
|
||||
it("läser år, månad och dag", () => {
|
||||
expect(parseStoryDate("1987")).toEqual({ year: 1987 });
|
||||
expect(parseStoryDate("1987-03")).toEqual({ year: 1987, month: 3 });
|
||||
expect(parseStoryDate("1987-03-04")).toEqual({ year: 1987, month: 3, day: 4 });
|
||||
expect(parseStoryDate(" 2004-6-2 ")).toEqual({ year: 2004, month: 6, day: 2 });
|
||||
});
|
||||
|
||||
it("avvisar ogiltiga datum", () => {
|
||||
for (const bad of ["", "abc", "1987-13", "1987-00", "1987-02-30", "1987-04-31", "2023-02-29", "0000", "1987-03-04-05", "-5", 1987, null, undefined]) {
|
||||
expect(parseStoryDate(bad)).toBeNull();
|
||||
}
|
||||
});
|
||||
|
||||
it("kan skrivas utan att Date används, så att berättelsen får ligga var som helst", () => {
|
||||
expect(parseStoryDate("0850")).toEqual({ year: 850 });
|
||||
expect(parseStoryDate("2400-12-31")).toEqual({ year: 2400, month: 12, day: 31 });
|
||||
});
|
||||
|
||||
it("skottår stämmer", () => {
|
||||
expect(parseStoryDate("2024-02-29")).not.toBeNull();
|
||||
expect(parseStoryDate("1900-02-29")).toBeNull();
|
||||
expect(parseStoryDate("2000-02-29")).not.toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("normalizeStoryDate", () => {
|
||||
it("skriver datum i fast form", () => {
|
||||
expect(normalizeStoryDate("1987")).toBe("1987");
|
||||
expect(normalizeStoryDate("987")).toBe("0987");
|
||||
expect(normalizeStoryDate("2004-6-2")).toBe("2004-06-02");
|
||||
expect(normalizeStoryDate("2004-6")).toBe("2004-06");
|
||||
expect(normalizeStoryDate("nej")).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("sortering", () => {
|
||||
it("ett årtal kommer före datumen samma år", () => {
|
||||
expect(storyDateKey("1987")).toBeLessThan(storyDateKey("1987-01-01"));
|
||||
expect(storyDateKey("1987-03")).toBeLessThan(storyDateKey("1987-03-04"));
|
||||
expect(["1990", "1987-12-31", "1987", "1987-03"].sort(compareStoryDates)).toEqual(["1987", "1987-03", "1987-12-31", "1990"]);
|
||||
});
|
||||
|
||||
it("ogiltigt datum ger NaN", () => {
|
||||
expect(storyDateKey("x")).toBeNaN();
|
||||
});
|
||||
});
|
||||
|
||||
describe("ageAt", () => {
|
||||
it("räknar hela år med födelsedag", () => {
|
||||
expect(ageAt("1990-06-15", "2020-06-14")).toBe(29);
|
||||
expect(ageAt("1990-06-15", "2020-06-15")).toBe(30);
|
||||
expect(ageAt("1990-06-15", "2020-12-31")).toBe(30);
|
||||
expect(ageAt("1990-06-15", "2020-01-01")).toBe(29);
|
||||
});
|
||||
|
||||
it("räknar bara på år när månad saknas", () => {
|
||||
expect(ageAt("1990", "2020-01-01")).toBe(30);
|
||||
expect(ageAt("1990-06-15", "2020")).toBe(30);
|
||||
expect(ageAt("1990-06", "2020-05")).toBe(29);
|
||||
});
|
||||
|
||||
it("kan inte vara negativ", () => {
|
||||
expect(ageAt("2000-01-01", "1999-12-31")).toBeNull();
|
||||
expect(ageAt("2000", "1999")).toBeNull();
|
||||
expect(ageAt("2000-01-01", "2000-01-01")).toBe(0);
|
||||
});
|
||||
|
||||
it("ogiltiga datum ger null", () => {
|
||||
expect(ageAt("x", "2000")).toBeNull();
|
||||
expect(ageAt("2000", "y")).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("storyYear", () => {
|
||||
it("ger året", () => {
|
||||
expect(storyYear("1987-03-04")).toBe(1987);
|
||||
expect(storyYear("tomt")).toBeNull();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,133 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildTimeline, TIMELINE_KINDS, type TimelineInput, type TimelineKind } from "@/lib/timeline";
|
||||
|
||||
const anna = { id: "anna", name: "Anna" };
|
||||
const bo = { id: "bo", name: "Bo" };
|
||||
|
||||
const input = (overrides: Partial<TimelineInput> = {}): TimelineInput => ({
|
||||
characters: [
|
||||
{ ...anna, birthDate: "1960-05-10", deathDate: "2020-01-15" },
|
||||
{ ...bo, birthDate: "1990" },
|
||||
],
|
||||
scenarios: [],
|
||||
events: [],
|
||||
relations: [],
|
||||
...overrides,
|
||||
});
|
||||
|
||||
describe("buildTimeline", () => {
|
||||
it("tar födelse och död från karaktärernas datum, i datumordning", () => {
|
||||
const { items } = buildTimeline(input());
|
||||
expect(items.map((i) => [i.kind, i.title, i.date])).toEqual([
|
||||
["birth", "Anna", "1960-05-10"],
|
||||
["birth", "Bo", "1990"],
|
||||
["death", "Anna", "2020-01-15"],
|
||||
]);
|
||||
});
|
||||
|
||||
it("räknar ut åldern vid varje händelse", () => {
|
||||
const { items } = buildTimeline(
|
||||
input({ events: [{ id: "e1", title: "Bröllop", date: "1985-08-01", people: [anna, bo] }, { id: "e2", title: "Fest", date: "2005", people: [anna, bo] }] }),
|
||||
);
|
||||
const wedding = items.find((i) => i.title === "Bröllop")!;
|
||||
// Bo är inte född 1985
|
||||
expect(wedding.ages).toEqual([{ id: "anna", name: "Anna", age: 25 }]);
|
||||
const party = items.find((i) => i.title === "Fest")!;
|
||||
// Bara året är känt för festen, så åldern blir skillnaden i år
|
||||
expect(party.ages.map((a) => [a.name, a.age])).toEqual([
|
||||
["Anna", 45],
|
||||
["Bo", 15],
|
||||
]);
|
||||
});
|
||||
|
||||
it("visar ingen ålder för den som hunnit dö", () => {
|
||||
const { items } = buildTimeline(input({ events: [{ id: "e", title: "Minnesstund", date: "2021", people: [anna, bo] }] }));
|
||||
expect(items.find((i) => i.title === "Minnesstund")!.ages.map((a) => a.name)).toEqual(["Bo"]);
|
||||
});
|
||||
|
||||
it("visar ingen ålder vid födelsen själv", () => {
|
||||
const { items } = buildTimeline(input());
|
||||
expect(items.find((i) => i.kind === "birth")!.ages).toEqual([]);
|
||||
});
|
||||
|
||||
it("scenarier utan datum hamnar i en egen lista", () => {
|
||||
const { items, undated } = buildTimeline(
|
||||
input({
|
||||
scenarios: [
|
||||
{ id: "s1", name: "Olyckan", date: "1999-07-01", type: "Olycka", people: [anna] },
|
||||
{ id: "s2", name: "Rymmen", date: null, people: [] },
|
||||
{ id: "s3", name: "Trasigt", date: "inte ett datum", people: [] },
|
||||
],
|
||||
}),
|
||||
);
|
||||
expect(items.filter((i) => i.kind === "scenario").map((i) => [i.title, i.detail])).toEqual([["Olyckan", "Olycka"]]);
|
||||
expect(undated.map((u) => u.title)).toEqual(["Rymmen", "Trasigt"]);
|
||||
});
|
||||
|
||||
it("relationer med period visas från startdatumet", () => {
|
||||
const { items } = buildTimeline(input({ relations: [{ id: "r", type: "Gift", startDate: "2004-06", endDate: "2011", people: [anna, bo] }] }));
|
||||
const relation = items.find((i) => i.kind === "relation")!;
|
||||
expect(relation).toMatchObject({ date: "2004-06", endDate: "2011", endOnly: false, title: "Gift" });
|
||||
});
|
||||
|
||||
it("en relation med bara slutdatum markeras som ett slut", () => {
|
||||
const { items } = buildTimeline(input({ relations: [{ id: "r", type: "Vänner", startDate: null, endDate: "2001", people: [anna, bo] }] }));
|
||||
expect(items.find((i) => i.kind === "relation")).toMatchObject({ date: "2001", endDate: null, endOnly: true });
|
||||
});
|
||||
|
||||
it("relationer utan datum visas inte", () => {
|
||||
const { items } = buildTimeline(input({ relations: [{ id: "r", type: "Vänner", people: [anna, bo] }] }));
|
||||
expect(items.some((i) => i.kind === "relation")).toBe(false);
|
||||
});
|
||||
|
||||
it("ogiltiga datum ignoreras utan fel", () => {
|
||||
const { items } = buildTimeline(input({ characters: [{ ...anna, birthDate: "förra veckan", deathDate: "1999-02-30" }], events: [{ id: "e", title: "X", date: "oklart", people: [] }] }));
|
||||
expect(items).toEqual([]);
|
||||
});
|
||||
|
||||
it("filtrerar på typ", () => {
|
||||
const events = [{ id: "e", title: "Flytt", date: "2000", people: [anna] }];
|
||||
const only = (...kinds: TimelineKind[]) => buildTimeline(input({ events }), new Set(kinds)).items.map((i) => i.kind);
|
||||
expect(only("event")).toEqual(["event"]);
|
||||
expect(only("birth", "death")).toEqual(["birth", "birth", "death"]);
|
||||
expect(buildTimeline(input({ events }), new Set(TIMELINE_KINDS)).items).toHaveLength(4);
|
||||
});
|
||||
|
||||
it("filtrerar på person", () => {
|
||||
const events = [{ id: "e1", title: "Flytt", date: "2000", people: [anna] }, { id: "e2", title: "Resa", date: "2001", people: [bo] }];
|
||||
const { items, undated } = buildTimeline(input({ events, scenarios: [{ id: "s", name: "Utan datum", date: null, people: [] }] }), undefined, "bo");
|
||||
expect(items.map((i) => i.title)).toEqual(["Bo", "Resa"]);
|
||||
expect(undated).toEqual([]);
|
||||
});
|
||||
|
||||
it("sorterar år före månader och dagar samma år", () => {
|
||||
const { items } = buildTimeline(
|
||||
input({
|
||||
characters: [],
|
||||
events: [
|
||||
{ id: "1", title: "Dag", date: "2000-03-04", people: [] },
|
||||
{ id: "2", title: "År", date: "2000", people: [] },
|
||||
{ id: "3", title: "Månad", date: "2000-03", people: [] },
|
||||
{ id: "4", title: "Tidigare", date: "1999-12-31", people: [] },
|
||||
],
|
||||
}),
|
||||
);
|
||||
expect(items.map((i) => i.title)).toEqual(["Tidigare", "År", "Månad", "Dag"]);
|
||||
});
|
||||
|
||||
it("normaliserar datum som skrivits för hand", () => {
|
||||
const { items } = buildTimeline(input({ characters: [], events: [{ id: "1", title: "A", date: "2000-3-4", people: [] }] }));
|
||||
expect(items[0].date).toBe("2000-03-04");
|
||||
});
|
||||
|
||||
it("tom bok ger tom tidslinje", () => {
|
||||
expect(buildTimeline({ characters: [], scenarios: [], events: [], relations: [] })).toEqual({ items: [], undated: [] });
|
||||
});
|
||||
|
||||
it("länkar går till rätt sida", () => {
|
||||
const { items } = buildTimeline(input({ events: [{ id: "e1", title: "Flytt", date: "2000", people: [] }], relations: [{ id: "r1", type: "Gift", startDate: "2000", people: [] }] }));
|
||||
expect(items.find((i) => i.kind === "event")!.link).toBe("timeline/e1");
|
||||
expect(items.find((i) => i.kind === "relation")!.link).toBe("relations/r1");
|
||||
expect(items.find((i) => i.kind === "birth" && i.title === "Anna")!.link).toBe("entity/anna");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user