File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1382,6 +1382,20 @@ Save it for your next mountain escape!
13821382 expect ( normalizeReadabilityText ( 123 ) ) . to . equal ( '' ) ;
13831383 } ) ;
13841384 } ) ;
1385+
1386+ describe ( 'isLikelyNavigationElement (direct module import)' , ( ) => {
1387+ it ( 'returns true when a descendant matches navHdr / nav-hdr paragraph selectors' , async ( ) => {
1388+ const { isLikelyNavigationElement } = await import ( '../../../src/readability/shared/analysis-utils.js' ) ;
1389+ const $ = cheerioLoad ( `
1390+ <div id="region">
1391+ <p class="navHdr">Shop categories</p>
1392+ <p id="sibling">Other marketing copy in the same container as the nav header row.</p>
1393+ </div>
1394+ ` ) ;
1395+ const region = $ ( '#region' ) . get ( 0 ) ;
1396+ expect ( isLikelyNavigationElement ( $ , region ) ) . to . equal ( true ) ;
1397+ } ) ;
1398+ } ) ;
13851399} ) ;
13861400
13871401describe ( 'embed-content-utils (unit)' , ( ) => {
You can’t perform that action at this time.
0 commit comments