fix test for github actions blazing fucking fast mac machines
This commit is contained in:
@@ -308,10 +308,9 @@ describe("permission-groups routes — audit log shape", () => {
|
|||||||
username: admin.user.username,
|
username: admin.user.username,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
// The most recent entry should reflect the second swap.
|
|
||||||
const entry = logs
|
const entry = logs
|
||||||
.filter((l) => l.details && l.details.includes(`"targetUserId":${target.user.id}`))
|
.filter((l) => l.details && l.details.includes(`"targetUserId":${target.user.id}`))
|
||||||
.sort((a, b) => b.timestamp - a.timestamp)[0];
|
.sort((a, b) => b.timestamp - a.timestamp || (b.id ?? 0) - (a.id ?? 0))[0];
|
||||||
expect(entry).toBeDefined();
|
expect(entry).toBeDefined();
|
||||||
const parsed = JSON.parse(entry!.details!);
|
const parsed = JSON.parse(entry!.details!);
|
||||||
expect(parsed.permissionsAdded).toEqual(["clients:disconnect"]);
|
expect(parsed.permissionsAdded).toEqual(["clients:disconnect"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user