Permalink
Browse files

tests: separate res.send() chain test

closes #3448
  • Loading branch information...
chainhelen authored and dougwilson committed Oct 11, 2017
1 parent 53bee25 commit 950f4423f0f881e40b1f68339054c209aec6d0e3
Showing with 14 additions and 1 deletion.
  1. +14 −1 test/res.send.js
View
@@ -1,4 +1,5 @@
var assert = require('assert')
var Buffer = require('safe-buffer').Buffer
var express = require('..');
var methods = require('methods');
@@ -54,7 +55,7 @@ describe('res', function(){
var app = express();
app.use(function(req, res){
res.send(201).should.equal(res);
res.send(201)
});
request(app)
@@ -354,6 +355,18 @@ describe('res', function(){
.expect('{"foo":"bar"}', done);
})
it('should be chainable', function (done) {
var app = express()
app.use(function (req, res) {
assert.equal(res.send('hey'), res)
})
request(app)
.get('/')
.expect(200, 'hey', done)
})
describe('"etag" setting', function () {
describe('when enabled', function () {
it('should send ETag', function (done) {

0 comments on commit 950f442

Please sign in to comment.