diff --git a/test/server/client-option.test.js b/test/server/client-option.test.js index 3a791b3ee0..e755758786 100644 --- a/test/server/client-option.test.js +++ b/test/server/client-option.test.js @@ -105,26 +105,6 @@ describe("client option", () => { await server.stop(); }); - - it("disables hot entry", async () => { - const compiler = webpack(config); - - server = new Server( - { - hot: false, - port, - }, - compiler - ); - - await server.start(); - - const res = await request(server.app).get("/main.js"); - - expect(res.text).not.toMatch(/webpack\/hot\/dev-server\.js/); - - await server.stop(); - }); }); describe("webSocketTransport", () => { diff --git a/test/server/hot-option.test.js b/test/server/hot-option.test.js index e42ab0405c..643828d662 100644 --- a/test/server/hot-option.test.js +++ b/test/server/hot-option.test.js @@ -34,6 +34,35 @@ describe("hot option", () => { }); }); + describe("simple config with hot: false", () => { + beforeAll(async () => { + const compiler = webpack(config); + + server = new Server( + { + port, + hot: false, + }, + compiler + ); + + await server.start(); + + req = request(server.app); + }); + + afterAll(async () => { + await server.stop(); + }); + + it("should not include hot script in the bundle", async () => { + const response = await req.get("/main.js"); + + expect(response.status).toEqual(200); + expect(response.text).not.toContain("webpack/hot/dev-server.js"); + }); + }); + describe("simple hot-only config entries", () => { beforeAll(async () => { const compiler = webpack(config);