Skip to content

Commit 6f43ab6

Browse files
test: fix
1 parent dd91f76 commit 6f43ab6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/server/setupExitSignals-option.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const port = require("../ports-map")["setup-exit-signals-option"];
88
describe("setupExitSignals option", () => {
99
let server;
1010
let exitSpy;
11-
let killSpy;
11+
let stopCallbackSpy;
1212
let stdinResumeSpy;
1313

1414
const signals = ["SIGINT", "SIGTERM"];
@@ -30,7 +30,7 @@ describe("setupExitSignals option", () => {
3030
stdinResumeSpy = jest
3131
.spyOn(process.stdin, "resume")
3232
.mockImplementation(() => {});
33-
killSpy = jest.spyOn(server.server, "kill");
33+
stopCallbackSpy = jest.spyOn(server, "stopCallback");
3434
});
3535

3636
afterEach(async () => {
@@ -48,7 +48,7 @@ describe("setupExitSignals option", () => {
4848
process.emit(signal);
4949

5050
setTimeout(() => {
51-
expect(killSpy.mock.calls.length).toEqual(1);
51+
expect(stopCallbackSpy.mock.calls.length).toEqual(1);
5252
expect(exitSpy.mock.calls.length).toEqual(1);
5353

5454
done();

0 commit comments

Comments
 (0)