Skip to content

Commit

Permalink
test: fix overwrite Content-Type (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmohns authored and evilebottnawi committed Mar 6, 2019
1 parent 894ba2b commit dba5e02
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/tests/server.js
Expand Up @@ -262,18 +262,21 @@ describe('Server', () => {
describe('custom Content-Type', () => {
before((done) => {
app = express();
app.use((req, res, next) => {
res.set('Content-Type', 'application/octet-stream');
next();
});
const compiler = webpack(webpackConfig);
instance = middleware(compiler, {
stats: 'errors-only',
logLevel,
headers: { 'Content-Type': 'application/octet-stream' }
logLevel
});
app.use(instance);
listen = listenShorthand(done);
});
after(close);

it('Do not guess mime type if Content-Type header is found ', (done) => {
it('Do not guess mime type if Content-Type header is found', (done) => {
request(app).get('/bundle.js')
.expect('Content-Type', 'application/octet-stream')
.expect(200, done);
Expand Down

0 comments on commit dba5e02

Please sign in to comment.