File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments