@@ -521,21 +521,24 @@ describe("threadLinkContextReferences", () => {
521521 ( ) => "Here" ,
522522 ) ;
523523 expect ( pasted . records ) . toEqual ( [ copied , threadContextRecord ( thread ( "env-9" , "t9" ) , "Here" ) ] ) ;
524- for ( const [ environmentId , threadId , carried ] of [
525- [ "env-1" , "a)b" , true ] ,
526- [ "env-1" , "a b" , true ] ,
527- [ "env-1" , "a>b" , true ] ,
528- [ "env-1" , "a%29b" , true ] ,
529- [ "env-1" , ".." , true ] ,
530- [ "source/machine" , "t1" , true ] ,
524+ for ( const [ environmentId , threadId , form ] of [
525+ [ "env-1" , "a)b" , "https://" ] ,
526+ [ "env-1" , "a(b" , "https://" ] ,
527+ [ "env-1" , "a b" , "https://" ] ,
528+ [ "env-1" , "a>b" , "https://" ] ,
529+ [ "env-1" , "a\\!b" , "https://" ] ,
530+ [ "env-1" , "a%29b" , "t3-thread://" ] ,
531+ [ "env-1" , ".." , "t3-thread://" ] ,
532+ [ "source/machine" , "t1" , "https://" ] ,
531533 // No link form carries both: a hosted URL drops the dot segment.
532- [ "." , "a b" , false ] ,
534+ [ "." , "a b" , null ] ,
533535 ] as const ) {
534536 const record = threadContextRecord ( thread ( environmentId , threadId ) , "Copied title" ) ;
535537 const link = unreadableThreadContextLink ( record ) ;
536- if ( ! carried ) expect ( link ) . toBe ( "Copied title" ) ;
538+ if ( form === null ) expect ( link ) . toBe ( "Copied title" ) ;
539+ else expect ( link ) . toContain ( `](${ form } ` ) ;
537540 expect ( threadLinkContextReferences ( link , [ ] , ( ) => undefined ) . records ) . toEqual (
538- carried ? [ record ] : [ ] ,
541+ form === null ? [ ] : [ record ] ,
539542 ) ;
540543 }
541544 expect (
0 commit comments