Files
Jiwon ChoiandGitHub cbb6811171 test: confirm that middleware may affect sitemap.xml render (#69140)
Add test to confirm that the middleware affects the sitemap path if the
matcher is misconfigured.

Following of https://github.com/vercel/next.js/pull/69136
Closes NDX-221
2024-08-22 00:44:58 +09:00

16 lines
413 B
TypeScript

import { nextTestSetup } from 'e2e-utils'
describe('middleware-sitemap', () => {
const { next } = nextTestSetup({
files: __dirname,
})
it('should be affected by middleware for sitemap.xml if there is no matcher', async () => {
let html = await next.render('/')
expect(html).toContain('redirected')
html = await next.render('/sitemap.xml')
expect(html).toContain('redirected')
})
})