You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
527 B
20 lines
527 B
var test = require('tape'); |
|
var hyperquest = require('../'); |
|
var http = require('http'); |
|
|
|
var server = http.createServer(function (req, res) { res.end() }); |
|
|
|
test('readable', function (t) { |
|
server.listen(function () { |
|
var port = server.address().port; |
|
var req = hyperquest('http://localhost:' + port); |
|
t.notOk(req.flowing); |
|
t.ok(req._read); |
|
req.on('data', function () {}); |
|
req.on('end', function () { |
|
server.close(); |
|
t.end(); |
|
}); |
|
}); |
|
}); |
|
|
|
|