Skip to content

Commit 7d4e11a

Browse files
committed
improve assertion for flaky test (#1330)
* improve assertion for flaky test * fix lints
1 parent f3df3a5 commit 7d4e11a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

server/tests/unit/storage.spec.ts

+10-8
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,16 @@ describe("Storage: Room Spec", () => {
5252
expect(room).toBeDefined();
5353
expect(typeof room).toEqual("object");
5454
expect(room).not.toBeInstanceOf(DbRoom);
55-
expect(room).toMatchObject({
56-
name: "example",
57-
title: "Example Room",
58-
description: "This is an example room.",
59-
visibility: Visibility.Public,
60-
queueMode: QueueMode.Vote,
61-
owner: null,
62-
});
55+
expect(room).toEqual(
56+
expect.objectContaining({
57+
name: "example",
58+
title: "Example Room",
59+
description: "This is an example room.",
60+
visibility: Visibility.Public,
61+
queueMode: QueueMode.Vote,
62+
owner: null,
63+
})
64+
);
6365
});
6466

6567
it("should return room object from room name, case insensitive", async () => {

0 commit comments

Comments
 (0)