Skip to content
Myr

req.acceptsEncoding.js

This file

Path

test/req.acceptsEncoding.js

36 lines · 853 bytes · JavaScript

Last changed by

tests: fix incorrect should usageDaniel Walasekbefore adoption713d2ae

History of this file

Take it

The walk stopped after 200 commits: lines older than dd2b897 point at it.

examples: comment the usage of process.nextTickMuhammad Saqibbefore adoptiondd2b897

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

tests: fix typos in test descriptionsVishvajit Pathakbefore adoptionbd47aeb

line 7why, one step back
7 it('should be true if encoding accepted', function(done){

examples: comment the usage of process.nextTickMuhammad Saqibbefore adoptiondd2b897

lines 8–10why, one step back
8 var app = express();
910 app.use(function(req, res){

tests: fix incorrect should usageDaniel Walasekbefore adoption713d2ae

lines 11–12why, one step back
11 req.acceptsEncoding('gzip').should.be.ok()
12 req.acceptsEncoding('deflate').should.be.ok()

examples: comment the usage of process.nextTickMuhammad Saqibbefore adoptiondd2b897

lines 13–21why, one step back
13 res.end();
14 });1516 request(app)17 .get('/')18 .set('Accept-Encoding', ' gzip, deflate')19 .expect(200, done);20 })21

tests: fix typos in test descriptionsVishvajit Pathakbefore adoptionbd47aeb

line 22why, one step back
22 it('should be false if encoding not accepted', function(done){

examples: comment the usage of process.nextTickMuhammad Saqibbefore adoptiondd2b897

lines 23–25why, one step back
23 var app = express();
2425 app.use(function(req, res){

tests: fix incorrect should usageDaniel Walasekbefore adoption713d2ae

line 26why, one step back
26 req.acceptsEncoding('bogus').should.not.be.ok()

examples: comment the usage of process.nextTickMuhammad Saqibbefore adoptiondd2b897

lines 27–36why, one step back
27 res.end();
28 });2930 request(app)31 .get('/')32 .set('Accept-Encoding', ' gzip, deflate')33 .expect(200, done);34 })35 })36})