-async function checkNotifications (url: string, token: string, expected: UserNotificationType[]) {
- const res = await getUserNotifications(url, token, 0, 10, true)
-
- const notifications: UserNotification[] = res.body.data
-
- expect(notifications).to.have.lengthOf(expected.length)
+async function checkNotifications (server: ServerInfo, token: string, expected: UserNotificationType[]) {
+ const { data } = await server.notificationsCommand.list({ token, start: 0, count: 10, unread: true })
+ expect(data).to.have.lengthOf(expected.length)