Skip to content

Commit fb23f7b

Browse files
authored
chore: add test for in-fragment HEAD reflection (#35320)
1 parent 0162911 commit fb23f7b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test/e2e/next-head/app/components/meta.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ export function Meta(props) {
66
<Head>
77
<meta name="test-head-3" content="hello" />
88
<meta name="test-head-4" content="hello" />
9+
<>
10+
<meta name="test-in-fragment" content="hello" />
11+
</>
912
</Head>
1013
</>
1114
)

test/e2e/next-head/index.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ describe('should set-up next', () => {
4444
}
4545
})
4646

47+
it('should have correct head tags from a fragment', async () => {
48+
const html = await renderViaHTTP(next.url, '/')
49+
const $ = cheerio.load(html)
50+
51+
expect($(`meta[name="test-in-fragment"]`).attr()['content']).toBe('hello')
52+
})
53+
4754
it('should have correct head tags after hydration', async () => {
4855
const browser = await webdriver(next.url, '/')
4956

0 commit comments

Comments
 (0)