Skip to content

Commit

Permalink
update message to only show once
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Apr 10, 2023
1 parent 8e1b314 commit c760447
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/next/src/lib/metadata/resolvers/resolve-url.ts
Expand Up @@ -29,7 +29,7 @@ function resolveUrl(
// next build mode warning, add new line prefix for worker output
console.log()
Log.warnOnce(
`metadata.metadataBase is not set for resolving url "${url}", fallbacks to "${metadataBase.origin}". See https://beta.nextjs.org/docs/api-reference/metadata#metadatabase`
`metadata.metadataBase is not set in root layout, fallbacks to "${metadataBase.origin}". See https://beta.nextjs.org/docs/api-reference/metadata#metadatabase`
)
}

Expand Down
Expand Up @@ -10,9 +10,8 @@ createNextDescribe(
it('should fallback to localhost if metadataBase is missing for absolute urls resolving', async () => {
await next.fetch('/blog')
expect(next.cliOutput).toInclude(
'metadata.metadataBase is not set for resolving url "/blog/opengraph-image?'
'metadata.metadataBase is not set in root layout, fallbacks to "http://localhost:'
)
expect(next.cliOutput).toInclude(', fallbacks to "http://localhost:')
expect(next.cliOutput).toInclude(
'. See https://beta.nextjs.org/docs/api-reference/metadata#metadatabase'
)
Expand Down

0 comments on commit c760447

Please sign in to comment.