Skip to content
Myr

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 file

Take 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 back
1'use strict'

deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e

lines 2–6why, one step back
2
3var express = require('../')4 , request = require('supertest');56describe('req', function(){

tests: fix typos in descriptions김정환before adoptionb9b1b19

line 7why, one step back
7 describe('.acceptsEncodings', function () {

tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484

line 8why, one step back
8 it('should return encoding if accepted', function (done) {

deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e

lines 9–10why, one step back
9 var app = express();
10

tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484

lines 11–12why, one step back
11 app.get('/', function (req, res) {
12 res.send({

tests: fix req.acceptsEncodings testsDouglas Christopher Wilsonbefore adoption8ee3420

lines 13–14why, one step back
13 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 back
15 })
16 })

deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e

lines 17–18why, one step back
17
18 request(app)

tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484

lines 19–21why, one step back
19 .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 back
22 })
2324 it('should be false if encoding not accepted', function(done){25 var app = express();26

tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484

lines 27–28why, one step back
27 app.get('/', function (req, res) {
28 res.send({

tests: fix req.acceptsEncodings testsDouglas Christopher Wilsonbefore adoption8ee3420

line 29why, one step back
29 bogus: req.acceptsEncodings('bogus')

tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484

lines 30–31why, one step back
30 })
31 })

deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e

lines 32–33why, one step back
32
33 request(app)

tests: fix wording of req.accepts* test casesDouglas Christopher Wilsonbefore adoption215f484

lines 34–36why, one step back
34 .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 back
37 })
38 })39})