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
bccdb3fd
Unverified
Commit
bccdb3fd
authored
Aug 19, 2025
by
Jiachi Liu
Committed by
GitHub
Aug 19, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] separate metadata font tests (#82746)
parent
13f413bb
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
10 deletions
+38
-10
index.test.ts
test/e2e/app-dir/metadata-dynamic-routes/index.test.ts
+0
-10
opengraph-image.tsx
test/e2e/app-dir/metadata-font/app/font/opengraph-image.tsx
+0
-0
opengraph-image2.tsx
test/e2e/app-dir/metadata-font/app/font/opengraph-image2.tsx
+0
-0
page.tsx
test/e2e/app-dir/metadata-font/app/font/page.tsx
+0
-0
layout.tsx
test/e2e/app-dir/metadata-font/app/layout.tsx
+11
-0
typewr__.ttf
test/e2e/app-dir/metadata-font/assets/typewr__.ttf
+0
-0
metadata-font.test.ts
test/e2e/app-dir/metadata-font/metadata-font.test.ts
+17
-0
next.config.js
test/e2e/app-dir/metadata-font/next.config.js
+10
-0
No files found.
test/e2e/app-dir/metadata-dynamic-routes/index.test.ts
View file @
bccdb3fd
...
@@ -330,16 +330,6 @@ describe('app dir - metadata dynamic routes', () => {
...
@@ -330,16 +330,6 @@ describe('app dir - metadata dynamic routes', () => {
// should already normalize the parallel routes segment to url
// should already normalize the parallel routes segment to url
expect
(
ogImageUrl
).
not
.
toContain
(
'(group)'
)
expect
(
ogImageUrl
).
not
.
toContain
(
'(group)'
)
})
})
it
(
'should handle custom fonts in both edge and nodejs runtime'
,
async
()
=>
{
const
resOgEdge
=
await
next
.
fetch
(
'/font/opengraph-image'
)
const
resOgNodejs
=
await
next
.
fetch
(
'/font/opengraph-image2'
)
expect
(
resOgEdge
.
status
).
toBe
(
200
)
expect
(
resOgEdge
.
headers
.
get
(
'content-type'
)).
toBe
(
'image/png'
)
expect
(
resOgNodejs
.
status
).
toBe
(
200
)
expect
(
resOgNodejs
.
headers
.
get
(
'content-type'
)).
toBe
(
'image/png'
)
})
})
})
describe
(
'icon image routes'
,
()
=>
{
describe
(
'icon image routes'
,
()
=>
{
...
...
test/e2e/app-dir/metadata-
dynamic-routes
/app/font/opengraph-image.tsx
→
test/e2e/app-dir/metadata-
font
/app/font/opengraph-image.tsx
View file @
bccdb3fd
File moved
test/e2e/app-dir/metadata-
dynamic-routes
/app/font/opengraph-image2.tsx
→
test/e2e/app-dir/metadata-
font
/app/font/opengraph-image2.tsx
View file @
bccdb3fd
File moved
test/e2e/app-dir/metadata-
dynamic-routes
/app/font/page.tsx
→
test/e2e/app-dir/metadata-
font
/app/font/page.tsx
View file @
bccdb3fd
File moved
test/e2e/app-dir/metadata-font/app/layout.tsx
0 → 100644
View file @
bccdb3fd
export
default
function
RootLayout
({
children
,
}:
{
children
:
React
.
ReactNode
})
{
return
(
<
html
>
<
body
>
{
children
}
</
body
>
</
html
>
)
}
test/e2e/app-dir/metadata-font/assets/typewr__.ttf
0 → 100644
View file @
bccdb3fd
File added
test/e2e/app-dir/metadata-font/metadata-font.test.ts
0 → 100644
View file @
bccdb3fd
import
{
nextTestSetup
}
from
'e2e-utils'
describe
(
'app dir - metadata font'
,
()
=>
{
const
{
next
}
=
nextTestSetup
({
files
:
__dirname
,
})
it
(
'should handle custom fonts in both edge and nodejs runtime'
,
async
()
=>
{
const
resOgEdge
=
await
next
.
fetch
(
'/font/opengraph-image'
)
const
resOgNodejs
=
await
next
.
fetch
(
'/font/opengraph-image2'
)
expect
(
resOgEdge
.
status
).
toBe
(
200
)
expect
(
resOgEdge
.
headers
.
get
(
'content-type'
)).
toBe
(
'image/png'
)
expect
(
resOgNodejs
.
status
).
toBe
(
200
)
expect
(
resOgNodejs
.
headers
.
get
(
'content-type'
)).
toBe
(
'image/png'
)
})
})
test/e2e/app-dir/metadata-font/next.config.js
0 → 100644
View file @
bccdb3fd
/** @type {import('next').NextConfig} */
module
.
exports
=
{}
// For development: analyze the bundled chunks for stats app
if
(
process
.
env
.
ANALYZE
)
{
const
withBundleAnalyzer
=
require
(
'@next/bundle-analyzer'
)({
enabled
:
true
,
})
module
.
exports
=
withBundleAnalyzer
(
module
.
exports
)
}
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