fix: fix sitemaps routes test (#7441)
* fix: fix sitemaps routes test * avoid checking all top-tokens paths
This commit is contained in:
parent
9f44e48cf1
commit
b75438bc8b
@ -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
|
||||
.filter((p) => !p.includes(':') && !p.includes('*') && !p.includes('not-found'))
|
||||
sitemapPaths
|
||||
.filter((p) => !p.includes('/0x'))
|
||||
.forEach((path: string) => {
|
||||
expect(sitemapPaths).toContain(path)
|
||||
expect(pathNames).toContain(path)
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user