File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -262,18 +262,21 @@ describe('Server', () => {
262
262
describe ( 'custom Content-Type' , ( ) => {
263
263
before ( ( done ) => {
264
264
app = express ( ) ;
265
+ app . use ( ( req , res , next ) => {
266
+ res . set ( 'Content-Type' , 'application/octet-stream' ) ;
267
+ next ( ) ;
268
+ } ) ;
265
269
const compiler = webpack ( webpackConfig ) ;
266
270
instance = middleware ( compiler , {
267
271
stats : 'errors-only' ,
268
- logLevel,
269
- headers : { 'Content-Type' : 'application/octet-stream' }
272
+ logLevel
270
273
} ) ;
271
274
app . use ( instance ) ;
272
275
listen = listenShorthand ( done ) ;
273
276
} ) ;
274
277
after ( close ) ;
275
278
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 ) => {
277
280
request ( app ) . get ( '/bundle.js' )
278
281
. expect ( 'Content-Type' , 'application/octet-stream' )
279
282
. expect ( 200 , done ) ;
You can’t perform that action at this time.
0 commit comments