mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
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
16 lines
413 B
TypeScript
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')
|
|
})
|
|
})
|