Skip to content

Commit

Permalink
Tests: Resurrect the static gzipped content test
Browse files Browse the repository at this point in the history
  • Loading branch information
d00rman committed Jun 22, 2018
1 parent 8fb3e18 commit b7c615e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/features/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,16 @@ describe('express app', function() {
});
});

it.skip('should get static content gzipped', () => {
it('should get static content gzipped', () => {
return preq.get({
uri: `${server.config.uri}static/index.html`,
headers: {
'accept-encoding': 'gzip, deflate'
}
}).then((res) => {
// check that the response is gzip-ed
assert.deepEqual(res.headers['content-encoding'], 'gzip', 'Expected gzipped contents!');
assert.deepEqual(res.status, 200);
// if there is no content-length, the reponse was gzipped
assert.deepEqual(res.headers['content-length'], undefined, 'Did not expect the content-length header!');
});
});

Expand All @@ -79,8 +80,8 @@ describe('express app', function() {
'accept-encoding': ''
}
}).then((res) => {
// check that the response is gzip-ed
const contentEncoding = res.headers['content-encoding'];
assert.deepEqual(res.status, 200);
assert.deepEqual(contentEncoding, undefined, 'Did not expect gzipped contents!');
});
});
Expand Down

0 comments on commit b7c615e

Please sign in to comment.