Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
fb23f7b6
Unverified
Commit
fb23f7b6
authored
May 23, 2022
by
Corbin Crutchley
Committed by
GitHub
May 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: add test for in-fragment HEAD reflection (#35320)
parent
01629113
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
meta.js
test/e2e/next-head/app/components/meta.js
+3
-0
index.test.ts
test/e2e/next-head/index.test.ts
+7
-0
No files found.
test/e2e/next-head/app/components/meta.js
View file @
fb23f7b6
...
@@ -6,6 +6,9 @@ export function Meta(props) {
...
@@ -6,6 +6,9 @@ export function Meta(props) {
<
Head
>
<
Head
>
<
meta
name
=
"test-head-3"
content
=
"hello"
/>
<
meta
name
=
"test-head-3"
content
=
"hello"
/>
<
meta
name
=
"test-head-4"
content
=
"hello"
/>
<
meta
name
=
"test-head-4"
content
=
"hello"
/>
<>
<
meta
name
=
"test-in-fragment"
content
=
"hello"
/>
<
/
>
<
/Head
>
<
/Head
>
<
/
>
<
/
>
)
)
...
...
test/e2e/next-head/index.test.ts
View file @
fb23f7b6
...
@@ -44,6 +44,13 @@ describe('should set-up next', () => {
...
@@ -44,6 +44,13 @@ describe('should set-up next', () => {
}
}
})
})
it
(
'should have correct head tags from a fragment'
,
async
()
=>
{
const
html
=
await
renderViaHTTP
(
next
.
url
,
'/'
)
const
$
=
cheerio
.
load
(
html
)
expect
(
$
(
`meta[name="test-in-fragment"]`
).
attr
()[
'content'
]).
toBe
(
'hello'
)
})
it
(
'should have correct head tags after hydration'
,
async
()
=>
{
it
(
'should have correct head tags after hydration'
,
async
()
=>
{
const
browser
=
await
webdriver
(
next
.
url
,
'/'
)
const
browser
=
await
webdriver
(
next
.
url
,
'/'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment