aboutsummaryrefslogtreecommitdiff
path: root/src/util/config.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/config.test.ts')
-rw-r--r--src/util/config.test.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/config.test.ts b/src/util/config.test.ts
index 19d7564..418edb7 100644
--- a/src/util/config.test.ts
+++ b/src/util/config.test.ts
@@ -1,11 +1,11 @@
+const exit = jest
+ .spyOn(process, "exit")
+ .mockImplementation(() => undefined as never);
+
import { configOrError, handleShutdown } from "./config";
import { MongoClient } from "mongodb";
import { Server } from "http";
-const exit = jest.spyOn(process, "exit").mockImplementation(() => {
- throw Error("");
-});
-
const CommonMocks = {
connect: jest.fn(),
isConnected: jest.fn(),
@@ -111,7 +111,7 @@ describe("handleShutdown", () => {
}
// Assert
- expect(exit).toHaveBeenCalledWith(1);
+ expect(exit).toHaveBeenCalledWith(0);
});
it("should exit with error with Mongo error", async () => {