mirror of
https://github.com/outline/outline.git
synced 2026-12-05 18:55:10 +03:00
test: Fix race condition
This commit is contained in:
1 parent
a87bda82b1
commit
97e91eb06b
1 file changed
+9
-3
@@ -179,9 +179,15 @@ describe("revisions.create", () => {
|
||||
expect(events[2].documentId).toEqual(document.id);
|
||||
|
||||
// Events should mention correct `userId`.
|
||||
expect(events[0].userId).toEqual(collaborator0.id);
|
||||
expect(events[1].userId).toEqual(collaborator1.id);
|
||||
expect(events[2].userId).toEqual(collaborator2.id);
|
||||
const userIds = events.map((event) => event.userId);
|
||||
expect(userIds).toEqual(
|
||||
expect.arrayContaining([
|
||||
collaborator0.id,
|
||||
collaborator1.id,
|
||||
collaborator2.id,
|
||||
])
|
||||
);
|
||||
expect(userIds.length).toBe(3);
|
||||
});
|
||||
|
||||
test("should not send multiple emails", async () => {
|
||||
|
||||
Reference in new issue
Block a user