chore: We have a sleep at home. The sleep at home:

This commit is contained in:
cpojer
2026-02-02 21:34:47 +09:00
parent dfef943f0a
commit 6b0d6e2540
18 changed files with 69 additions and 49 deletions

View File

@@ -1,4 +1,5 @@
import { describe, expect, it, vi } from "vitest";
import { sleep } from "../utils.ts";
import {
removeAckReactionAfterReply,
shouldAckReaction,
@@ -237,7 +238,7 @@ describe("removeAckReactionAfterReply", () => {
remove,
onError,
});
await new Promise((resolve) => setTimeout(resolve, 0));
await sleep(0);
expect(remove).toHaveBeenCalledTimes(1);
expect(onError).not.toHaveBeenCalled();
});
@@ -250,7 +251,7 @@ describe("removeAckReactionAfterReply", () => {
ackReactionValue: "👀",
remove,
});
await new Promise((resolve) => setTimeout(resolve, 0));
await sleep(0);
expect(remove).not.toHaveBeenCalled();
});
@@ -262,7 +263,7 @@ describe("removeAckReactionAfterReply", () => {
ackReactionValue: "👀",
remove,
});
await new Promise((resolve) => setTimeout(resolve, 0));
await sleep(0);
expect(remove).not.toHaveBeenCalled();
});
});