Skip to content

Commit

Permalink
fix: fix sitemaps routes test
Browse files Browse the repository at this point in the history
  • Loading branch information
kristiehuang committed Oct 10, 2023
1 parent 45c3e1d commit b824cb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ describe('Routes', () => {
const contents = fs.readFileSync('./public/sitemap.xml', 'utf8')
const sitemap = await parseStringPromise(contents)

const sitemapPaths = sitemap.urlset.url.map((url: any) => new URL(url['$'].loc).pathname)
const sitemapPaths: string[] = sitemap.urlset.url.map((url: any) => new URL(url['$'].loc).pathname)

pathNames
sitemapPaths
.filter((p) => !p.includes(':') && !p.includes('*') && !p.includes('not-found'))
.forEach((path: string) => {
expect(sitemapPaths).toContain(path)
expect(pathNames).toContain(path)
})
})

Expand Down

0 comments on commit b824cb8

Please sign in to comment.