MCPcopy
hub / github.com/vercel/next.js / invalidRequest

Function invalidRequest

test/production/pages-dir/production/test/security.ts:26–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 describe('With Security Related Issues', () => {
25 it.skip('should handle invalid URL properly', async () => {
26 async function invalidRequest() {
27 return new Promise((resolve, reject) => {
28 const request = http.request(
29 {
30 hostname: `localhost`,
31 port: next.appPort,
32 path: `*`,
33 },
34 (response) => {
35 resolve(response.statusCode)
36 }
37 )
38 request.on('error', (err) => reject(err))
39 request.end()
40 })
41 }
42 try {
43 expect(await invalidRequest()).toBe(400)
44 expect(await invalidRequest()).toBe(400)

Callers 1

security.tsFile · 0.85

Calls 5

endMethod · 0.65
resolveFunction · 0.50
rejectFunction · 0.50
requestMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected