File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -486,6 +486,24 @@ describe( "Autolinker", function() {
486486 } ) ;
487487
488488
489+ it ( "should automatically link twitter handles surrounded by parentheses" , function ( ) {
490+ var result = Autolinker . link ( "Joe's twitter is (@joe_the_man12)" ) ;
491+ expect ( result ) . toBe ( 'Joe\'s twitter is (<a href="https://twitter.com/joe_the_man12" target="_blank">@joe_the_man12</a>)' ) ;
492+ } ) ;
493+
494+
495+ it ( "should automatically link twitter handles surrounded by braces" , function ( ) {
496+ var result = Autolinker . link ( "Joe's twitter is {@joe_the_man12}" ) ;
497+ expect ( result ) . toBe ( 'Joe\'s twitter is {<a href="https://twitter.com/joe_the_man12" target="_blank">@joe_the_man12</a>}' ) ;
498+ } ) ;
499+
500+
501+ it ( "should automatically link twitter handles surrounded by brackets" , function ( ) {
502+ var result = Autolinker . link ( "Joe's twitter is [@joe_the_man12]" ) ;
503+ expect ( result ) . toBe ( 'Joe\'s twitter is [<a href="https://twitter.com/joe_the_man12" target="_blank">@joe_the_man12</a>]' ) ;
504+ } ) ;
505+
506+
489507 it ( "should automatically link multiple twitter handles in a string" , function ( ) {
490508 var result = Autolinker . link ( "@greg is tweeting @joe with @josh" ) ;
491509 expect ( result ) . toBe ( '<a href="https://twitter.com/greg" target="_blank">@greg</a> is tweeting <a href="https://twitter.com/joe" target="_blank">@joe</a> with <a href="https://twitter.com/josh" target="_blank">@josh</a>' ) ;
You can’t perform that action at this time.
0 commit comments