@@ -458,6 +458,7 @@ describe('The config-generator function', () => {
458
458
const config = createConfig ( ) ;
459
459
config . runtimeConfig . useDevServer = true ;
460
460
config . runtimeConfig . devServerUrl = 'http://localhost:8080/' ;
461
+ config . runtimeConfig . useHotModuleReplacement = false ;
461
462
config . outputPath = '/tmp/public/build' ;
462
463
config . setPublicPath ( '/build/' ) ;
463
464
config . addEntry ( 'main' , './main' ) ;
@@ -467,6 +468,7 @@ describe('The config-generator function', () => {
467
468
// is calculated as outputPath, but without the publicPath portion
468
469
expect ( actualConfig . devServer . contentBase ) . to . equal ( '/tmp/public' ) ;
469
470
expect ( actualConfig . devServer . publicPath ) . to . equal ( '/build/' ) ;
471
+ expect ( actualConfig . devServer . hot ) . to . be . false ;
470
472
471
473
} ) ;
472
474
@@ -486,5 +488,18 @@ describe('The config-generator function', () => {
486
488
expect ( actualConfig . devServer . contentBase ) . to . equal ( '/tmp/public' ) ;
487
489
expect ( actualConfig . devServer . publicPath ) . to . equal ( '/subdirectory/build/' ) ;
488
490
} ) ;
491
+
492
+ it ( 'hot mode' , ( ) => {
493
+ const config = createConfig ( ) ;
494
+ config . runtimeConfig . useDevServer = true ;
495
+ config . runtimeConfig . devServerUrl = 'http://localhost:8080/' ;
496
+ config . runtimeConfig . useHotModuleReplacement = true ;
497
+ config . publicPath = '/' ;
498
+ config . outputPath = '/tmp' ;
499
+ config . addEntry ( 'main' , './main' ) ;
500
+
501
+ const actualConfig = configGenerator ( config ) ;
502
+ expect ( actualConfig . devServer . hot ) . to . be . true ;
503
+ } ) ;
489
504
} ) ;
490
505
} ) ;
0 commit comments