|
|
@ -11,6 +11,10 @@ s.on('/', function (req, res) { |
|
|
|
req.pipe(res); |
|
|
|
}); |
|
|
|
|
|
|
|
s.on('/empty', function (req, res) { |
|
|
|
res.end(); |
|
|
|
}); |
|
|
|
|
|
|
|
tape('setup', function (t) { |
|
|
|
s.listen(s.port, function () { |
|
|
|
t.end(); |
|
|
@ -33,6 +37,13 @@ tape('send data from options with post request', function (t) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
tape('works with empty post response', function (t) { |
|
|
|
got(s.url + '/empty', {body: 'wow'}, function (err, data) { |
|
|
|
t.equal(data, ''); |
|
|
|
t.end(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
tape('return writeable stream', function (t) { |
|
|
|
got.post(s.url) |
|
|
|
.on('data', function (data) { |
|
|
|