supertest
Advanced tools
Comparing version 0.5.0 to 0.5.1
0.5.1 2012-12-07 | ||
================== | ||
* fix .expect(status) should assert only status | ||
0.5.0/ 2012-11-28 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -96,3 +96,3 @@ | ||
// body | ||
if ('function' != typeof b) this._bodies.push(b); | ||
if ('function' != typeof b && arguments.length > 1) this._bodies.push(b); | ||
return this; | ||
@@ -152,3 +152,3 @@ } | ||
} | ||
// body | ||
@@ -155,0 +155,0 @@ for (var i = 0; i < bodies.length; i++) { |
{ | ||
"name": "supertest", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Super-agent driven library for testing HTTP servers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -140,2 +140,17 @@ | ||
describe('.expect(status)', function () { | ||
it('should assert only status', function (done) { | ||
var app = express(); | ||
app.get('/', function (req, res) { | ||
res.send('hey'); | ||
}) | ||
request(app) | ||
.get('/') | ||
.expect(200) | ||
.end(done) | ||
}) | ||
}) | ||
describe('.expect(status, body[, fn])', function(){ | ||
@@ -142,0 +157,0 @@ it('should assert the response body and status', function(done){ |
19920
495