We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d76b3cb commit 4653825Copy full SHA for 4653825
test/compression.js
@@ -28,6 +28,7 @@ describe('compression()', function () {
28
request(server)
29
.get('/')
30
.set('Accept-Encoding', 'gzip')
31
+ .expect(shouldHaveHeader('Content-Encoding'))
32
.expect(shouldHaveBodyLength(reponseText.length))
33
.expect(200, done)
34
})
@@ -702,6 +703,12 @@ function shouldHaveBodyLength (length) {
702
703
}
704
705
706
+function shouldHaveHeader (header) {
707
+ return function (res) {
708
+ assert.ok((header.toLowerCase() in res.headers), 'should have header ' + header)
709
+ }
710
+}
711
+
712
function shouldNotHaveHeader (header) {
713
return function (res) {
714
assert.ok(!(header.toLowerCase() in res.headers), 'should not have header ' + header)
0 commit comments