mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 19:50:45 +00:00
test: tighten messaging plugin array assertions
This commit is contained in:
@@ -25,8 +25,8 @@ describe("parsePostContent", () => {
|
||||
expect(result.textContent).toBe(
|
||||
"Daily \\*Plan\\*\n\n**Bold** *Italic* <u>Underline</u> ~~Strike~~ `Code`",
|
||||
);
|
||||
expect(result.imageKeys).toEqual([]);
|
||||
expect(result.mentionedOpenIds).toEqual([]);
|
||||
expect(result.imageKeys).toStrictEqual([]);
|
||||
expect(result.mentionedOpenIds).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("renders links and mentions", () => {
|
||||
@@ -70,7 +70,7 @@ describe("parsePostContent", () => {
|
||||
|
||||
expect(result.textContent).toBe("Before ![image] after\n![image]");
|
||||
expect(result.imageKeys).toEqual(["img_1", "img_2"]);
|
||||
expect(result.mentionedOpenIds).toEqual([]);
|
||||
expect(result.mentionedOpenIds).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("supports locale wrappers", () => {
|
||||
|
||||
@@ -85,7 +85,7 @@ describe("createSequentialQueue", () => {
|
||||
).rejects.toThrow("boom");
|
||||
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
expect(unhandled).toEqual([]);
|
||||
expect(unhandled).toStrictEqual([]);
|
||||
|
||||
await expect(
|
||||
enqueue("feishu:default:chat-1", async () => {
|
||||
@@ -156,7 +156,7 @@ describe("createSequentialQueue", () => {
|
||||
// Wait long enough that a timeout would have fired if it were active.
|
||||
await vi.advanceTimersByTimeAsync(30);
|
||||
expect(order).toEqual(["first:start"]);
|
||||
expect(timeouts).toEqual([]);
|
||||
expect(timeouts).toStrictEqual([]);
|
||||
|
||||
gate.resolve();
|
||||
await Promise.all([first, second]);
|
||||
|
||||
Reference in New Issue
Block a user