(req)
| 1331 | port: 0, |
| 1332 | hostname: '127.0.0.1', |
| 1333 | fetch(req) { |
| 1334 | const url = new URL(req.url); |
| 1335 | let filePath = url.pathname === '/' ? '/index.html' : url.pathname; |
| 1336 | filePath = filePath.replace(/^\//, ''); |
| 1337 | const fullPath = path.join(qaFixDir, filePath); |
| 1338 | if (!fs.existsSync(fullPath)) { |
| 1339 | return new Response('Not Found', { status: 404 }); |
| 1340 | } |
| 1341 | const content = fs.readFileSync(fullPath, 'utf-8'); |
| 1342 | return new Response(content, { |
| 1343 | headers: { 'Content-Type': 'text/html' }, |
| 1344 | }); |
| 1345 | }, |
| 1346 | }); |
| 1347 | }); |
| 1348 |
no outgoing calls
no test coverage detected