Skip to content

Commit b1ae0b3

Browse files
test: more
1 parent b5ee78d commit b1ae0b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/server/setupExitSignals-option.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ describe("setupExitSignals option", () => {
1111
let exitSpy;
1212
let stopCallbackSpy;
1313
let stdinResumeSpy;
14+
let closeCallbackSpy;
1415

1516
const signals = ["SIGINT", "SIGTERM"];
1617

@@ -36,6 +37,7 @@ describe("setupExitSignals option", () => {
3637
.spyOn(process.stdin, "resume")
3738
.mockImplementation(() => {});
3839
stopCallbackSpy = jest.spyOn(server, "stopCallback");
40+
closeCallbackSpy = jest.spyOn(server.compiler, "close");
3941
});
4042

4143
afterEach(async () => {
@@ -56,6 +58,7 @@ describe("setupExitSignals option", () => {
5658
const interval = setInterval(() => {
5759
if (doExit) {
5860
expect(stopCallbackSpy.mock.calls.length).toEqual(1);
61+
expect(closeCallbackSpy.mock.calls.length).toEqual(1);
5962

6063
clearInterval(interval);
6164

0 commit comments

Comments
 (0)