Skip to content

Commit

Permalink
improve assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Dec 5, 2024
1 parent 5011994 commit 1e6188b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/app-dir/app-middleware/app-middleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ describe('app-dir with middleware', () => {
})
})

it('merges link headers from the middleware and the page', async () => {
it('keeps a link header from the middleware', async () => {
const res = await next.fetch('/preloads')
expect(res.headers.get('link')).toBe(
'<https://example.com/page>; rel="alternate"; hreflang="en", </_next/static/media/a34f9d1faa5f3315-s.p.woff2>; rel=preload; as="font"; crossorigin=""; type="font/woff2", </_next/image?url=%2Ffavicon.ico&w=32&q=75>; rel=preload; as="image"; imagesrcset="/_next/image?url=%2Ffavicon.ico&w=16&q=75 1x%2C /_next/image?url=%2Ffavicon.ico&w=32&q=75 2x"'
expect(res.headers.get('link')).toContain(
'<https://example.com/page>; rel="alternate"; hreflang="en"'
)
})

Expand Down

0 comments on commit 1e6188b

Please sign in to comment.