Skip to content

Commit dba5e02

Browse files
dmohnsevilebottnawi
authored andcommitted
test: fix overwrite Content-Type (#378)
1 parent 894ba2b commit dba5e02

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/tests/server.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -262,18 +262,21 @@ describe('Server', () => {
262262
describe('custom Content-Type', () => {
263263
before((done) => {
264264
app = express();
265+
app.use((req, res, next) => {
266+
res.set('Content-Type', 'application/octet-stream');
267+
next();
268+
});
265269
const compiler = webpack(webpackConfig);
266270
instance = middleware(compiler, {
267271
stats: 'errors-only',
268-
logLevel,
269-
headers: { 'Content-Type': 'application/octet-stream' }
272+
logLevel
270273
});
271274
app.use(instance);
272275
listen = listenShorthand(done);
273276
});
274277
after(close);
275278

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

0 commit comments

Comments
 (0)