(req, res)
| 20 | }).enable(); |
| 21 | |
| 22 | async function handler(req, res) { |
| 23 | executionAsyncResource()[sym] = { state: req.url }; |
| 24 | await sleep(10); |
| 25 | const { state } = executionAsyncResource()[sym]; |
| 26 | res.setHeader('content-type', 'application/json'); |
| 27 | res.end(JSON.stringify({ state })); |
| 28 | } |
| 29 | |
| 30 | const server = createServer(function(req, res) { |
| 31 | handler(req, res); |
no test coverage detected