],
);
});
+
+ it("[[Call]] returns this", () => {
+ const tag = new Tag();
+ assertStrictEquals(tag.addAltLabel(), tag);
+ });
});
describe("::addBroaderTag", () => {
);
});
+ it("[[Call]] returns this", () => {
+ const tag = new Tag();
+ assertStrictEquals(tag.addBroaderTag(), tag);
+ });
+
it("[[Call]] throws when adding a non‐persisted tag", () => {
const tag = new Tag();
assertThrows(() => {
],
);
});
+
+ it("[[Call]] returns this", () => {
+ const tag = new Tag();
+ assertStrictEquals(tag.addHiddenLabel(), tag);
+ });
});
describe("::addInCanonTag", () => {
);
});
+ it("[[Call]] returns this", () => {
+ const tag = new Tag("EntityTag");
+ assertStrictEquals(tag.addInCanonTag(), tag);
+ });
+
it("[[Call]] throws when this is not a tag which can be placed in canon", () => {
assertThrows(() => {
new Tag().addInCanonTag();
);
});
+ it("[[Call]] returns this", () => {
+ const tag = new Tag("ConceptualTag");
+ assertStrictEquals(tag.addInvolvesTag(), tag);
+ });
+
it("[[Call]] throws when this is not a conceptual tag", () => {
assertThrows(() => {
new Tag().addInvolvesTag();
);
assertEquals([...tag.altLabels()], ["four"]);
});
+
+ it("[[Call]] returns this", () => {
+ const tag = new Tag();
+ assertStrictEquals(tag.deleteAltLabel(), tag);
+ });
});
describe("::deleteBroaderTag", () => {
[broader2.identifier],
);
});
+
+ it("[[Call]] returns this", () => {
+ const tag = new Tag();
+ assertStrictEquals(tag.deleteBroaderTag(), tag);
+ });
});
describe("::deleteHiddenLabel", () => {
);
assertEquals([...tag.hiddenLabels()], ["four"]);
});
+
+ it("[[Call]] returns this", () => {
+ const tag = new Tag();
+ assertStrictEquals(tag.deleteHiddenLabel(), tag);
+ });
});
describe("::deleteInCanonTag", () => {
[canon2.identifier],
);
});
+
+ it("[[Call]] returns this", () => {
+ const tag = new Tag("EntityTag");
+ assertStrictEquals(tag.deleteInCanonTag(), tag);
+ });
});
describe("::deleteInvolvesTag", () => {
[involved2.identifier],
);
});
+
+ it("[[Call]] returns this", () => {
+ const tag = new Tag("ConceptualTag");
+ assertStrictEquals(tag.deleteInvolvesTag(), tag);
+ });
});
describe("::hasInCanonTags", () => {
const activity = tag.persist();
assertStrictEquals(activity, null);
});
+
+ it("[[Call]] returns undefined for a silent persist", () => {
+ const broader = new Tag();
+ broader.persist();
+ const tag = new Tag();
+ tag.prefLabel = "etaoin";
+ tag.addBroaderTag(broader);
+ assertStrictEquals(tag.persist(true), undefined);
+ });
});
describe("::prefLabel", () => {