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 00dedba
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ 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')
.then(res => {
res.headers.should.not.have.property('Content-Encoding');
})
);
});
});

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

0 comments on commit 00dedba

Please sign in to comment.