File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,20 +145,17 @@ describe("toSanitizedMarkdownHtml", () => {
145145
146146 it ( "does NOT link bare domains without www" , ( ) => {
147147 const html = toSanitizedMarkdownHtml ( "Visit google.com today" ) ;
148- expect ( html ) . not . toContain ( "<a" ) ;
149- expect ( html ) . toContain ( "google.com" ) ;
148+ expect ( html ) . toBe ( "<p>Visit google.com today</p>\n" ) ;
150149 } ) ;
151150
152151 it ( "does NOT link filenames with TLD-like extensions" , ( ) => {
153152 const html = toSanitizedMarkdownHtml ( "Check README.md and config.json" ) ;
154- expect ( html ) . not . toContain ( "<a" ) ;
155- expect ( html ) . toContain ( "README.md" ) ;
153+ expect ( html ) . toBe ( "<p>Check README.md and config.json</p>\n" ) ;
156154 } ) ;
157155
158156 it ( "does NOT link IP addresses" , ( ) => {
159157 const html = toSanitizedMarkdownHtml ( "Check 127.0.0.1:8080" ) ;
160- expect ( html ) . not . toContain ( "<a" ) ;
161- expect ( html ) . toContain ( "127.0.0.1:8080" ) ;
158+ expect ( html ) . toBe ( "<p>Check 127.0.0.1:8080</p>\n" ) ;
162159 } ) ;
163160
164161 it ( "keeps adjacent trailing CJK text outside www auto-links" , ( ) => {
You can’t perform that action at this time.
0 commit comments