Skip to content
Myr

tests: separate res.send() chain test

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

closes #3448

authored by chainhelen · committed by Douglas Christopher Wilson · parent 53bee25 · Browse files · 1 file+14 added−1 removed
This commit

State

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

Diff stats

1 file+14 added−1 removed

  • tests:+14 added−1 removed

1 file+14 added−1 removed

modified:test/res.send.js+14 added-1 removed
12var assert = require('assert')3var Buffer = require('safe-buffer').Buffer4var express = require('..');5var methods = require('methods');6var request = require('supertest');
47 unmodified lines
54 it('should set .statusCode', function(done){55 var app = express();5657 app.use(function(req, res){57 res.send(201).should.equal(res);58 res.send(201)59 });6061 request(app)62 .get('/')
291 unmodified lines
354 .get('/?callback=foo')355 .expect('{"foo":"bar"}', done);356 })357358 it('should be chainable', function (done) {359 var app = express()360361 app.use(function (req, res) {362 assert.equal(res.send('hey'), res)363 })364365 request(app)366 .get('/')367 .expect(200, 'hey', done)368 })369370 describe('"etag" setting', function () {371 describe('when enabled', function () {372 it('should send ETag', function (done) {373 var app = express();
202 unmodified lines