import { expect, it } from "bun:test"; import { entityTypeCatalog } from "../src/lib/entity-types"; const all = ["PERSON", "EMAIL", "REFERENZ", "ORT", "DATUM", "URL", "IP"]; it("uses the backend default selection when Velum reports one", () => { expect( entityTypeCatalog({ entity_types: all, default_entity_types: ["PERSON", "IP", "UNBEKANNT"], }), ).toEqual({ all, defaults: ["PERSON", "IP"] }); }); it("leaves IP, Datum and Referenz off for backends without a default list", () => { expect(entityTypeCatalog({ entity_types: all }).defaults).toEqual([ "PERSON", "EMAIL", "ORT", "URL", ]); });