Skip to content

Commit 144860b

Browse files
committed
test: add e2e test case for dotfile paths
1 parent 2a57bb5 commit 144860b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/e2e/simple-app.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,12 @@ test.describe('RSC cache poisoning', () => {
342342
expect(htmlResponse?.headers()['debug-netlify-cdn-cache-control']).toMatch(/s-maxage=31536000/)
343343
})
344344
})
345+
346+
test('Handles route with a path segment starting with dot correctly', async ({ simple }) => {
347+
const response = await fetch(`${simple.url}/.well-known/farcaster`)
348+
349+
expect(response.status).toBe(200)
350+
351+
const data = await response.json()
352+
expect(data).toEqual({ msg: 'Hi!' })
353+
})
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { NextResponse } from 'next/server'
2+
3+
export async function GET() {
4+
return NextResponse.json({
5+
msg: 'Hi!',
6+
})
7+
}
8+
9+
export const dynamic = 'force-dynamic'

0 commit comments

Comments
 (0)