(body: string)
| 72 | const received: string[] = []; |
| 73 | const html = |
| 74 | (body: string) => (req: IncomingMessage, res: ServerResponse) => { |
| 75 | received.push(req.url ?? ''); |
| 76 | res.writeHead(200, {'content-type': 'text/html; charset=utf-8'}); |
| 77 | res.end(`<html><body>${body}</body></html>`); |
| 78 | }; |
| 79 | server.addRoute('/allowed.html', html('Allowed')); |
| 80 | server.addRoute('/blocked.html', html('Blocked')); |
| 81 | return {received}; |
no outgoing calls
no test coverage detected