2 var express = require('../')
3 , request = require('supertest');
5 describe('req', function(){
6 describe('.acceptsEncoding', function(){
7 it('should be true if encoding accepted', function(done){
10 app.use(function(req, res){
11 req.acceptsEncoding('gzip').should.be.ok()
12 req.acceptsEncoding('deflate').should.be.ok()
18 .set('Accept-Encoding', ' gzip, deflate')
22 it('should be false if encoding not accepted', function(done){
25 app.use(function(req, res){
26 req.acceptsEncoding('bogus').should.not.be.ok()
32 .set('Accept-Encoding', ' gzip, deflate')