1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Files
docs/tests/routing/next.js
2023-06-12 20:19:48 +00:00

20 lines
598 B
JavaScript

import { describe, expect, jest, test } from '@jest/globals'
import { get } from '../helpers/e2etest.js'
describe('bad requests', () => {
jest.setTimeout(60 * 1000)
test('any _next/image request should 404', async () => {
const res = await get('/_next/image?what=ever')
expect(res.statusCode).toBe(404)
expect(res.headers['content-type']).toMatch('text/plain')
})
test('any _next.* request should 404', async () => {
const res = await get('/_next.php.hack.junk')
expect(res.statusCode).toBe(404)
expect(res.headers['content-type']).toMatch('text/plain')
})
})