Skip to content
Myr

add test for res.send(undefined)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Aaron Heckmann · committed by Tj Holowaychuk · parent dda89a5 · Browse files · 1 file+11 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>

Diff stats

1 file+11 added−0 removed

  • tests:+11 added−0 removed

1 file+11 added−0 removed

modified:test/response.test.js+11 added
48 unmodified lines
49 app.get('/noargs', function(req, res, next){50 res.send();51 });52 53 app.get('/undefined', function(req, res, next){54 res.send(undefined);55 });5657 app.get('/bool', function(req, res, next){58 res.send(true);59 });60
90 unmodified lines
151 { status: 204 }, function(res){152 assert.equal(undefined, res.headers['content-type']);153 assert.equal(undefined, res.headers['content-length']);154 });155156 assert.response(app,157 { url: '/undefined' },158 { status: 204 }, function(res){159 assert.equal(undefined, res.headers['content-type']);160 assert.equal(undefined, res.headers['content-length']);161 });162 },163 164 'test #contentType()': function(){165 var app = express.createServer();
442 unmodified lines