req.acceptsEncoding.js
This file
Path
test/req.acceptsEncoding.js
38 lines · 934 bytes · JavaScript
Last changed by
tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
History of this fileTake it
The walk stopped after 200 commits: lines older than 4196458 point at it.
deps: send@0.16.0Daniel Tschinderbefore adoption4196458
lines 1–6why, one step back12var express = require('../')3 , request = require('supertest');45describe('req', function(){6 describe('.acceptsEncoding', function(){tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
line 7why, one step back7 it('should return encoding if accepted', function (done) {deps: send@0.16.0Daniel Tschinderbefore adoption4196458
lines 8–9why, one step back8 var app = express();9tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 10–15why, one step back10 app.get('/', function (req, res) {11 res.send({12 gzip: req.acceptsEncoding('gzip'),13 deflate: req.acceptsEncoding('deflate')14 })15 })deps: send@0.16.0Daniel Tschinderbefore adoption4196458
lines 16–17why, one step back1617 request(app)tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 18–20why, one step back18 .get('/')19 .set('Accept-Encoding', ' gzip, deflate')20 .expect(200, { gzip: 'gzip', deflate: 'deflate' }, done)deps: send@0.16.0Daniel Tschinderbefore adoption4196458
lines 21–25why, one step back21 })2223 it('should be false if encoding not accepted', function(done){24 var app = express();25tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 26–30why, one step back26 app.get('/', function (req, res) {27 res.send({28 bogus: req.acceptsEncoding('bogus')29 })30 })deps: send@0.16.0Daniel Tschinderbefore adoption4196458
lines 31–32why, one step back3132 request(app)tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 33–35why, one step back33 .get('/')34 .set('Accept-Encoding', ' gzip, deflate')35 .expect(200, { bogus: false }, done)deps: send@0.16.0Daniel Tschinderbefore adoption4196458
lines 36–38why, one step back36 })37 })38})