(t, expected)
| 48 | }) |
| 49 | |
| 50 | function postServer (t, expected) { |
| 51 | return function (req, res) { |
| 52 | t.strictEqual(req.url, '/') |
| 53 | t.strictEqual(req.method, 'POST') |
| 54 | |
| 55 | req.setEncoding('utf8') |
| 56 | let data = '' |
| 57 | |
| 58 | req.on('data', function (d) { data += d }) |
| 59 | |
| 60 | req.on('end', () => { |
| 61 | t.strictEqual(data, expected) |
| 62 | res.end('hello') |
| 63 | }) |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | test('basic POST with string, async await support', async (t) => { |
| 68 | t = tspl(t, { plan: 5 }) |
no test coverage detected
searching dependent graphs…