Unverified Commit bccdb3fd authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

[test] separate metadata font tests (#82746)

parent 13f413bb
......@@ -330,16 +330,6 @@ describe('app dir - metadata dynamic routes', () => {
// should already normalize the parallel routes segment to url
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', () => {
......
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html>
<body>{children}</body>
</html>
)
}
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')
})
})
/** @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)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment