Add superagent and supertest definitions

This commit is contained in:
Alex Varju
2013-09-05 15:44:29 -07:00
parent a58894f898
commit edd97d5bd5
4 changed files with 165 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
/// <reference path="superagent.d.ts" />
import superagent = require('superagent')
var agent = superagent.agent();
agent
.post('http://localhost:3000/signin')
.send({ email: 'test@dummy.com', password: 'bacon' })
.end((err, res) => {
if (err) throw err;
if (res.status !== 200) throw new Error('bad status ' + res.status);
});