diff --git a/test/tests/server.js b/test/tests/server.js index 36f7cd0fc..37dae60a0 100644 --- a/test/tests/server.js +++ b/test/tests/server.js @@ -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);