Skip to content

Commit 338e18a

Browse files
committed
chore: add test for in-fragment HEAD reflection
1 parent 6611bfd commit 338e18a

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
@@ -27,6 +27,13 @@ describe('should set-up next', () => {
2727
}
2828
})
2929

30+
it('should have correct head tags from a fragment', async () => {
31+
const html = await renderViaHTTP(next.url, '/')
32+
const $ = cheerio.load(html)
33+
34+
expect($(`meta[name="test-in-fragment"]`).attr()['content']).toBe('hello')
35+
})
36+
3037
it('should have correct head tags after hydration', async () => {
3138
const browser = await webdriver(next.url, '/')
3239

0 commit comments

Comments
 (0)