@@ -613,33 +613,6 @@ describe('The config-generator function', () => {
613
613
expect ( actualConfig . devServer ) . to . be . undefined ;
614
614
} ) ;
615
615
616
- it ( 'devServer no hot mode' , ( ) => {
617
- const config = createConfig ( ) ;
618
- config . runtimeConfig . useDevServer = true ;
619
- config . runtimeConfig . devServerUrl = 'http://localhost:8080/' ;
620
- config . runtimeConfig . useHotModuleReplacement = false ;
621
- config . outputPath = isWindows ? 'C:\\tmp\\public' : '/tmp/public' ;
622
- config . setPublicPath ( '/' ) ;
623
- config . addEntry ( 'main' , './main' ) ;
624
-
625
- const actualConfig = configGenerator ( config ) ;
626
- expect ( actualConfig . devServer ) . to . not . be . undefined ;
627
- expect ( actualConfig . devServer . hot ) . to . be . false ;
628
- } ) ;
629
-
630
- it ( 'hot mode' , ( ) => {
631
- const config = createConfig ( ) ;
632
- config . runtimeConfig . useDevServer = true ;
633
- config . runtimeConfig . devServerUrl = 'http://localhost:8080/' ;
634
- config . runtimeConfig . useHotModuleReplacement = true ;
635
- config . outputPath = isWindows ? 'C:\\tmp\\public' : '/tmp/public' ;
636
- config . setPublicPath ( '/' ) ;
637
- config . addEntry ( 'main' , './main' ) ;
638
-
639
- const actualConfig = configGenerator ( config ) ;
640
- expect ( actualConfig . devServer . hot ) . to . be . true ;
641
- } ) ;
642
-
643
616
it ( 'devServer with custom options' , ( ) => {
644
617
const config = createConfig ( ) ;
645
618
config . runtimeConfig . useDevServer = true ;
@@ -664,59 +637,6 @@ describe('The config-generator function', () => {
664
637
} ,
665
638
} ) ;
666
639
} ) ;
667
-
668
- it ( 'devServer with custom watch options' , ( ) => {
669
- const config = createConfig ( ) ;
670
- config . runtimeConfig . useDevServer = true ;
671
- config . runtimeConfig . devServerUrl = 'http://localhost:8080/' ;
672
- config . runtimeConfig . useHotModuleReplacement = true ;
673
- config . outputPath = isWindows ? 'C:\\tmp\\public' : '/tmp/public' ;
674
- config . setPublicPath ( '/' ) ;
675
- config . addEntry ( 'main' , './main' ) ;
676
-
677
- config . configureWatchOptions ( watchOptions => {
678
- watchOptions . poll = 250 ;
679
- } ) ;
680
-
681
- const actualConfig = configGenerator ( config ) ;
682
-
683
- expect ( actualConfig . watchOptions ) . to . deep . equals ( {
684
- 'ignored' : / n o d e _ m o d u l e s / ,
685
- 'poll' : 250 ,
686
- } ) ;
687
- expect ( actualConfig . devServer . watchOptions ) . to . deep . equals ( {
688
- 'ignored' : / n o d e _ m o d u l e s / ,
689
- 'poll' : 250 ,
690
- } ) ;
691
- } ) ;
692
-
693
- it ( 'devServer with custom options and watch options' , ( ) => {
694
- const config = createConfig ( ) ;
695
- config . runtimeConfig . useDevServer = true ;
696
- config . runtimeConfig . devServerUrl = 'http://localhost:8080/' ;
697
- config . runtimeConfig . useHotModuleReplacement = true ;
698
- config . outputPath = isWindows ? 'C:\\tmp\\public' : '/tmp/public' ;
699
- config . setPublicPath ( '/' ) ;
700
- config . addEntry ( 'main' , './main' ) ;
701
-
702
- config . configureWatchOptions ( watchOptions => {
703
- watchOptions . poll = 250 ;
704
- } ) ;
705
- config . configureDevServerOptions ( options => {
706
- // should take precedence over `configureWatchOptions()`
707
- options . watchOptions . poll = 500 ;
708
- } ) ;
709
-
710
- const actualConfig = configGenerator ( config ) ;
711
- expect ( actualConfig . watchOptions ) . to . deep . equals ( {
712
- 'ignored' : / n o d e _ m o d u l e s / ,
713
- 'poll' : 250 ,
714
- } ) ;
715
- expect ( actualConfig . devServer . watchOptions ) . to . deep . equals ( {
716
- 'ignored' : / n o d e _ m o d u l e s / ,
717
- 'poll' : 500 ,
718
- } ) ;
719
- } ) ;
720
640
} ) ;
721
641
722
642
describe ( 'test for addPlugin config' , ( ) => {
0 commit comments