req.acceptsEncodings.js
This file
Path
test/req.acceptsEncodings.js
39 lines · 953 bytes · JavaScript
Last changed by
tests: fix req.acceptsEncodings testsDouglas Christopher Wilsonbefore adoption8ee3420
History of this fileTake it
The walk stopped after 200 commits: lines older than 76bf96e point at it.
tests: use strict modeDouglas Christopher Wilsonbefore adoptiona659137
line 1why, one step back1'use strict'deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e
lines 2–6why, one step back23var express = require('../')4 , request = require('supertest');56describe('req', function(){tests: fix typos in descriptions김정환before adoptionb9b1b19
line 7why, one step back7 describe('.acceptsEncodings', function () {tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
line 8why, one step back8 it('should return encoding if accepted', function (done) {deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e
lines 9–10why, one step back9 var app = express();10tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 11–12why, one step back11 app.get('/', function (req, res) {12 res.send({tests: fix req.acceptsEncodings testsDouglas Christopher Wilsonbefore adoption8ee3420
lines 13–14why, one step back13 gzip: req.acceptsEncodings('gzip'),14 deflate: req.acceptsEncodings('deflate')tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 15–16why, one step back15 })16 })deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e
lines 17–18why, one step back1718 request(app)tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 19–21why, one step back19 .get('/')20 .set('Accept-Encoding', ' gzip, deflate')21 .expect(200, { gzip: 'gzip', deflate: 'deflate' }, done)deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e
lines 22–26why, one step back22 })2324 it('should be false if encoding not accepted', function(done){25 var app = express();26tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 27–28why, one step back27 app.get('/', function (req, res) {28 res.send({tests: fix req.acceptsEncodings testsDouglas Christopher Wilsonbefore adoption8ee3420
line 29why, one step back29 bogus: req.acceptsEncodings('bogus')tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 30–31why, one step back30 })31 })deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e
lines 32–33why, one step back3233 request(app)tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484
lines 34–36why, one step back34 .get('/')35 .set('Accept-Encoding', ' gzip, deflate')36 .expect(200, { bogus: false }, done)deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e
lines 37–39why, one step back37 })38 })39})