File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,35 @@ describe("hot option", () => {
34
34
} ) ;
35
35
} ) ;
36
36
37
+ describe ( "simple config with hot: false" , ( ) => {
38
+ beforeAll ( async ( ) => {
39
+ const compiler = webpack ( config ) ;
40
+
41
+ server = new Server (
42
+ {
43
+ port,
44
+ hot : false ,
45
+ } ,
46
+ compiler
47
+ ) ;
48
+
49
+ await server . start ( ) ;
50
+
51
+ req = request ( server . app ) ;
52
+ } ) ;
53
+
54
+ afterAll ( async ( ) => {
55
+ await server . stop ( ) ;
56
+ } ) ;
57
+
58
+ it ( "should not include hot script in the bundle" , async ( ) => {
59
+ const response = await req . get ( "/main.js" ) ;
60
+
61
+ expect ( response . status ) . toEqual ( 200 ) ;
62
+ expect ( response . text ) . not . toContain ( "webpack/hot/dev-server.js" ) ;
63
+ } ) ;
64
+ } ) ;
65
+
37
66
describe ( "simple hot-only config entries" , ( ) => {
38
67
beforeAll ( async ( ) => {
39
68
const compiler = webpack ( config ) ;
You can’t perform that action at this time.
0 commit comments