@@ -522,6 +522,48 @@ test("Person.fromJsonLd()", async () => {
522
522
) ;
523
523
} ) ;
524
524
525
+ test ( "Person.toJsonLd()" , async ( ) => {
526
+ const person = new Person ( {
527
+ aliases : [ new URL ( "https://example.com/alias" ) ] ,
528
+ } ) ;
529
+ assertEquals ( await person . toJsonLd ( ) , {
530
+ "@context" : [
531
+ "https://www.w3.org/ns/activitystreams" ,
532
+ "https://w3id.org/security/v1" ,
533
+ "https://w3id.org/security/data-integrity/v1" ,
534
+ "https://www.w3.org/ns/did/v1" ,
535
+ "https://w3id.org/security/multikey/v1" ,
536
+ {
537
+ PropertyValue : "schema:PropertyValue" ,
538
+ alsoKnownAs : {
539
+ "@id" : "as:alsoKnownAs" ,
540
+ "@type" : "@id" ,
541
+ } ,
542
+ discoverable : "toot:discoverable" ,
543
+ featured : {
544
+ "@id" : "toot:featured" ,
545
+ "@type" : "@id" ,
546
+ } ,
547
+ featuredTags : {
548
+ "@id" : "toot:featuredTags" ,
549
+ "@type" : "@id" ,
550
+ } ,
551
+ indexable : "toot:indexable" ,
552
+ isCat : "misskey:isCat" ,
553
+ manuallyApprovesFollowers : "as:manuallyApprovesFollowers" ,
554
+ memorial : "toot:memorial" ,
555
+ misskey : "https://misskey-hub.net/ns#" ,
556
+ schema : "http://schema.org#" ,
557
+ suspended : "toot:suspended" ,
558
+ toot : "http://joinmastodon.org/ns#" ,
559
+ value : "schema:value" ,
560
+ } ,
561
+ ] ,
562
+ alsoKnownAs : "https://example.com/alias" ,
563
+ type : "Person" ,
564
+ } ) ;
565
+ } ) ;
566
+
525
567
test ( "Note.quoteUrl" , async ( ) => {
526
568
const note = new Note ( {
527
569
quoteUrl : new URL ( "https://example.com/object" ) ,
0 commit comments