visionmedia/supertest — pull request #54 by Arxisos (2013-03-14 16:59:09+00:00)
Title: Added request.agent(app) support

I added `request.agent(app)` support.
See following test:

```js
describe('request.agent(app)', function(){
var app = express();

app.use(express.cookieParser());

app.get('/', function(req, res){
res.cookie('cookie', 'hey');
res.send();
});

app.get('/return', function(req, res){
if(req.cookies.cookie) res.send(req.cookies.cookie);
else res.send(':(')
});

var agent = request.agent(app);

it('should save cookies', function(done){
agent
.get('/')
.expect('set-cookie', 'cookie=hey; Path=/', done);
})

it('should send cookies', function(done){
agent
.get('/return')
.expect('hey', done);
})
})
```