Skip to content

Commit bfc42d4

Browse files
committed
fix: restore all mocks in after-each hook
1 parent 65ff578 commit bfc42d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/unit/utils/sendReplyInDiscordChannel.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ describe("sendReplyInDiscordChannel", () => {
66
const mockEnv = { DISCORD_TOKEN: "mockToken" };
77

88
beforeEach(() => {
9-
jest.restoreAllMocks();
109
jest.clearAllMocks();
1110
});
11+
12+
afterEach(() => {
13+
jest.restoreAllMocks();
14+
})
1215

1316
it("should call fetch", async () => {
1417
jest.spyOn(global, "fetch").mockResolvedValue(new Response(content));

0 commit comments

Comments
 (0)