@@ -549,8 +549,8 @@ describe('app dir - metadata', () => {
549
549
it ( 'should render icon and apple touch icon meta if their images are specified' , async ( ) => {
550
550
const $ = await next . render$ ( '/icons/static/nested' )
551
551
552
- const $icon = $ ( 'head > link[rel="icon"][type!="image/x-icon"]' )
553
- const $appleIcon = $ ( 'head > link[rel="apple-touch-icon"]' )
552
+ const $icon = $ ( 'link[rel="icon"][type!="image/x-icon"]' )
553
+ const $appleIcon = $ ( 'link[rel="apple-touch-icon"]' )
554
554
555
555
expect ( $icon . attr ( 'href' ) ) . toMatch ( / \/ i c o n s \/ s t a t i c \/ n e s t e d \/ i c o n 1 / )
556
556
expect ( $icon . attr ( 'sizes' ) ) . toBe ( '32x32' )
@@ -565,19 +565,17 @@ describe('app dir - metadata', () => {
565
565
it ( 'should not render if image file is not specified' , async ( ) => {
566
566
const $ = await next . render$ ( '/icons/static' )
567
567
568
- const $icon = $ ( 'head > link[rel="icon"][type!="image/x-icon"]' )
568
+ const $icon = $ ( 'link[rel="icon"][type!="image/x-icon"]' )
569
569
570
570
expect ( $icon . attr ( 'href' ) ) . toMatch ( / \/ i c o n s \/ s t a t i c \/ i c o n / )
571
571
expect ( $icon . attr ( 'sizes' ) ) . toBe ( '114x114' )
572
572
573
573
// No apple icon if it's not provided
574
- const $appleIcon = $ ( 'head > link[rel="apple-touch-icon"]' )
574
+ const $appleIcon = $ ( 'link[rel="apple-touch-icon"]' )
575
575
expect ( $appleIcon . length ) . toBe ( 0 )
576
576
577
577
const $dynamic = await next . render$ ( '/icons/static/dynamic-routes/123' )
578
- const $dynamicIcon = $dynamic (
579
- 'head > link[rel="icon"][type!="image/x-icon"]'
580
- )
578
+ const $dynamicIcon = $dynamic ( 'link[rel="icon"][type!="image/x-icon"]' )
581
579
const dynamicIconHref = $dynamicIcon . attr ( 'href' )
582
580
expect ( dynamicIconHref ) . toMatch (
583
581
/ \/ i c o n s \/ s t a t i c \/ d y n a m i c - r o u t e s \/ 1 2 3 \/ i c o n /
@@ -845,7 +843,7 @@ describe('app dir - metadata', () => {
845
843
846
844
await check ( async ( ) => {
847
845
const $ = await next . render$ ( '/icons/static' )
848
- const $icon = $ ( 'head > link[rel="icon"][type!="image/x-icon"]' )
846
+ const $icon = $ ( 'link[rel="icon"][type!="image/x-icon"]' )
849
847
return $icon . attr ( 'href' )
850
848
} , / \/ i c o n s \/ s t a t i c \/ i c o n 2 / )
851
849
0 commit comments