Commit b75438bc authored by Kristie Huang's avatar Kristie Huang Committed by GitHub

fix: fix sitemaps routes test (#7441)

* fix: fix sitemaps routes test

* avoid checking all top-tokens paths
parent 9f44e48c
......@@ -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)
})
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment