@@ -25,7 +25,7 @@ const multiCompilerConfig = require("../fixtures/multi-compiler-one-configuratio
25
25
26
26
const cssFilePath = path . resolve (
27
27
__dirname ,
28
- "../fixtures/reload-config/main.css"
28
+ "../fixtures/reload-config/main.css" ,
29
29
) ;
30
30
31
31
const INVALID_MESSAGE = "[webpack-dev-server] App updated. Recompiling..." ;
@@ -366,7 +366,7 @@ describe("hot and live reload", () => {
366
366
host : `127.0.0.1:${ devServerOptions . port } ` ,
367
367
origin : `http://127.0.0.1:${ devServerOptions . port } ` ,
368
368
} ,
369
- }
369
+ } ,
370
370
) ;
371
371
372
372
let opened = false ;
@@ -406,7 +406,7 @@ describe("hot and live reload", () => {
406
406
} ) ;
407
407
} else {
408
408
const sockjs = new SockJS (
409
- `http://127.0.0.1:${ devServerOptions . port } /ws`
409
+ `http://127.0.0.1:${ devServerOptions . port } /ws` ,
410
410
) ;
411
411
412
412
let opened = false ;
@@ -476,18 +476,16 @@ describe("hot and live reload", () => {
476
476
} ) ;
477
477
478
478
const backgroundColorBefore = await page . evaluate ( ( ) => {
479
-
480
479
const body = document . body ;
481
480
482
-
483
481
return getComputedStyle ( body ) [ "background-color" ] ;
484
482
} ) ;
485
483
486
484
expect ( backgroundColorBefore ) . toEqual ( "rgb(0, 0, 255)" ) ;
487
485
488
486
fs . writeFileSync (
489
487
cssFilePath ,
490
- "body { background-color: rgb(255, 0, 0); }"
488
+ "body { background-color: rgb(255, 0, 0); }" ,
491
489
) ;
492
490
493
491
let waitHot =
@@ -521,7 +519,7 @@ describe("hot and live reload", () => {
521
519
waitLiveReload = true ;
522
520
} else if (
523
521
webpackOptions . entry . some ( ( item ) =>
524
- item . includes ( "live-reload=false" )
522
+ item . includes ( "live-reload=false" ) ,
525
523
)
526
524
) {
527
525
waitLiveReload = false ;
@@ -541,9 +539,8 @@ describe("hot and live reload", () => {
541
539
if ( waitHot ) {
542
540
await page . waitForFunction (
543
541
( ) =>
544
-
545
542
getComputedStyle ( document . body ) [ "background-color" ] ===
546
- "rgb(255, 0, 0)"
543
+ "rgb(255, 0, 0)" ,
547
544
) ;
548
545
549
546
expect ( doneHotUpdate ) . toBe ( true ) ;
@@ -564,10 +561,8 @@ describe("hot and live reload", () => {
564
561
}
565
562
566
563
const backgroundColorAfter = await page . evaluate ( ( ) => {
567
-
568
564
const body = document . body ;
569
565
570
-
571
566
return getComputedStyle ( body ) [ "background-color" ] ;
572
567
} ) ;
573
568
@@ -639,7 +634,7 @@ describe("simple hot config HMR plugin", () => {
639
634
expect ( JSON . stringify ( response . status ( ) ) ) . toMatchSnapshot ( ) ;
640
635
641
636
expect (
642
- JSON . stringify ( consoleMessages . map ( ( message ) => message . text ( ) ) )
637
+ JSON . stringify ( consoleMessages . map ( ( message ) => message . text ( ) ) ) ,
643
638
) . toMatchSnapshot ( ) ;
644
639
645
640
expect ( JSON . stringify ( pageErrors ) ) . toMatchSnapshot ( ) ;
@@ -703,7 +698,7 @@ describe("simple hot config HMR plugin with already added HMR plugin", () => {
703
698
expect ( JSON . stringify ( response . status ( ) ) ) . toMatchSnapshot ( ) ;
704
699
705
700
expect (
706
- JSON . stringify ( consoleMessages . map ( ( message ) => message . text ( ) ) )
701
+ JSON . stringify ( consoleMessages . map ( ( message ) => message . text ( ) ) ) ,
707
702
) . toMatchSnapshot ( ) ;
708
703
709
704
expect ( JSON . stringify ( pageErrors ) ) . toMatchSnapshot ( ) ;
@@ -747,7 +742,7 @@ describe("simple config with already added HMR plugin", () => {
747
742
await server . start ( ) ;
748
743
749
744
expect ( loggerWarnSpy ) . toHaveBeenCalledWith (
750
- `"hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.`
745
+ `"hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.` ,
751
746
) ;
752
747
753
748
await server . stop ( ) ;
@@ -759,7 +754,7 @@ describe("simple config with already added HMR plugin", () => {
759
754
await server . start ( ) ;
760
755
761
756
expect ( loggerWarnSpy ) . toHaveBeenCalledWith (
762
- `"hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.`
757
+ `"hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.` ,
763
758
) ;
764
759
765
760
await server . stop ( ) ;
@@ -771,7 +766,7 @@ describe("simple config with already added HMR plugin", () => {
771
766
await server . start ( ) ;
772
767
773
768
expect ( loggerWarnSpy ) . not . toHaveBeenCalledWith (
774
- `"hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.`
769
+ `"hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.` ,
775
770
) ;
776
771
777
772
await server . stop ( ) ;
@@ -831,7 +826,7 @@ describe("multi compiler hot config HMR plugin", () => {
831
826
expect ( JSON . stringify ( response . status ( ) ) ) . toMatchSnapshot ( ) ;
832
827
833
828
expect (
834
- JSON . stringify ( consoleMessages . map ( ( message ) => message . text ( ) ) )
829
+ JSON . stringify ( consoleMessages . map ( ( message ) => message . text ( ) ) ) ,
835
830
) . toMatchSnapshot ( ) ;
836
831
837
832
expect ( JSON . stringify ( pageErrors ) ) . toMatchSnapshot ( ) ;
@@ -891,7 +886,7 @@ describe("hot disabled HMR plugin", () => {
891
886
expect ( JSON . stringify ( response . status ( ) ) ) . toMatchSnapshot ( ) ;
892
887
893
888
expect (
894
- JSON . stringify ( consoleMessages . map ( ( message ) => message . text ( ) ) )
889
+ JSON . stringify ( consoleMessages . map ( ( message ) => message . text ( ) ) ) ,
895
890
) . toMatchSnapshot ( ) ;
896
891
897
892
expect ( JSON . stringify ( pageErrors ) ) . toMatchSnapshot ( ) ;
0 commit comments