Skip to content

Commit

Permalink
test: preCompressed disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh committed Nov 17, 2019
1 parent bf427b2 commit 713ce74
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,20 @@ describe('server', () => {
hexo.config.server.preCompressed = false;
});
});

it('Disable', () => {
hexo.config.server.preCompressed = false;

return Promise.using(
prepareServer(),
app => request(app)
.get('/foo%20bar.js')
.set('Accept-Encoding', 'gzip, br')
.then(res => {
res.headers.should.not.have.property('Content-Encoding');
})
);
});
});

it('Enable compression if options.compress is true', () => {
Expand Down

0 comments on commit 713ce74

Please sign in to comment.