Skip to content

Commit

Permalink
Fix test case to handle email addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed Feb 13, 2024
1 parent 429b6fa commit feae7fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/utils/__tests__/externalLinks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ onlyRunOnCI('externalLinks', () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
for (const [_linkName, url] of Object.entries(linksGroup)) {
expect(typeof url).toBe('string')
expect(url).toMatch(/^https:/)
expect(url).toMatch(/^(https|mailto):/)
}
}
})
Expand All @@ -32,6 +32,7 @@ onlyRunOnCI('externalLinks', () => {
if (url.startsWith(externalLinksModule.github.commit)) continue // We store only partial url in constants
if (url.startsWith(externalLinksModule.github.releaseTag)) continue // We store only partial url in constants
if (url.startsWith(externalLinksModule.ipfs.proxyPrefix)) continue // We store only partial url in constants
if (url.startsWith('mailto')) continue // We can't test email addresses

it.concurrent(`${linksGroupName} ${linkName} ${url}`, async () => {
const response = await nodeFetch(url, { method: 'GET' })
Expand Down

0 comments on commit feae7fd

Please sign in to comment.