Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit f8240a6

Browse files
committed
fix seo test
1 parent 1cab782 commit f8240a6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cypress/e2e/seo.cy.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe('canonical urls', () => {
1010

1111
cy.get('link[rel="canonical"]')
1212
.invoke('attr', 'href')
13-
.should('equal', `https://nitric.io${redirects[page] || page}`)
13+
.should('equal', `http://localhost:3000${redirects[page] || page}`)
14+
15+
cy.get('meta[property="og:url"]')
16+
.invoke('attr', 'content')
17+
.should('equal', `http://localhost:3000${redirects[page] || page}`)
1418
})
1519
})
1620
})

src/lib/constants.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ export const discordChatUrl =
3131
export const BASE_URL =
3232
process.env.NEXT_PUBLIC_VERCEL_ENV === 'production'
3333
? 'https://nitric.io'
34-
: `https://${process.env.NEXT_PUBLIC_VERCEL_URL || 'localhost:3000'}`
34+
: process.env.NEXT_PUBLIC_VERCEL_URL
35+
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
36+
: 'http://localhost:3000'

0 commit comments

Comments
 (0)