UNPKG

@fedify/fedify

Version:

An ActivityPub server framework

29 lines (25 loc) 932 B
import { Temporal } from "@js-temporal/polyfill"; import { URLPattern } from "urlpattern-polyfill"; globalThis.addEventListener = () => {}; import { assertEquals } from "../assert_equals-CTYbeopb.js"; import "../docloader-C8mmLN-Y.js"; import "../url-kTAI6_KP.js"; import "../multibase-DeCHcK8L.js"; import { Person } from "../vocab-dDpPQ0fF.js"; import "../langstr-DbWheeIS.js"; import { getTypeId } from "../type-D2s5lmbZ.js"; import { test } from "../testing-BZ0dJ4qn.js"; //#region vocab/type.test.ts test("getTypeId()", () => { const obj = new Person({}); assertEquals(getTypeId(obj), new URL("https://www.w3.org/ns/activitystreams#Person")); const obj2 = null; assertEquals(getTypeId(obj2), null); const obj3 = void 0; assertEquals(getTypeId(obj3), void 0); const obj4 = null; assertEquals(getTypeId(obj4), null); const obj5 = void 0; assertEquals(getTypeId(obj5), void 0); }); //#endregion