Skip to content

Commit 52d948a

Browse files
committed
test: move test case to appropriate place
1 parent 464b683 commit 52d948a

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

test/server/hot-option.test.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,35 @@ describe("hot option", () => {
3434
});
3535
});
3636

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+
3766
describe("simple hot-only config entries", () => {
3867
beforeAll(async () => {
3968
const compiler = webpack(config);

0 commit comments

Comments
 (0)