fix: complete user profile in unnecessary

This commit is contained in:
Apoorv Mishra committed 2023-04-19 18:43:52 +05:30
1 parent 007cbeaab6
commit cbff931907
2 files changed
+2 -3

No files matched your search

-1
View File
@@ -8,7 +8,6 @@ export default function presentNotification(notification: Notification) {
createdAt: notification.createdAt,
event: notification.event,
userId: notification.userId,
user: presentUser(notification.user),
actorId: notification.actorId,
actor: notification.actor ? presentUser(notification.actor) : undefined,
commentId: notification.commentId,
@@ -61,7 +61,7 @@ describe("#notifications.list", () => {
expect(body.data.length).toBe(3);
expect(body.unseenCount).toBe(2);
expect((randomElement(body.data) as any).actor.id).toBe(actor.id);
expect((randomElement(body.data) as any).user.id).toBe(user.id);
expect((randomElement(body.data) as any).userId).toBe(user.id);
const events = body.data.map((n: any) => n.event);
expect(events).toContain(NotificationEventType.UpdateDocument);
expect(events).toContain(NotificationEventType.CreateComment);
@@ -118,7 +118,7 @@ describe("#notifications.list", () => {
expect(body.data.length).toBe(1);
expect(body.unseenCount).toBe(1);
expect((randomElement(body.data) as any).actor.id).toBe(actor.id);
expect((randomElement(body.data) as any).user.id).toBe(user.id);
expect((randomElement(body.data) as any).userId).toBe(user.id);
const events = body.data.map((n: any) => n.event);
expect(events).toContain(NotificationEventType.MentionedInComment);
});