fix test/e2e/antennas.ts
This commit is contained in:
parent
2175181fa6
commit
7a2958f356
3 changed files with 22 additions and 19 deletions
|
|
@ -691,3 +691,19 @@ export async function captureWebhook<T = SystemWebhookPayload>(postAction: () =>
|
|||
|
||||
return JSON.parse(result) as T;
|
||||
}
|
||||
|
||||
|
||||
// the packed user inside each note returned by `users/notes` has the
|
||||
// latest `notesCount`, not the count at the time the note was
|
||||
// created, so we override it
|
||||
export function withNotesCount(notes, count) {
|
||||
return notes.map( note => {
|
||||
return {
|
||||
...note,
|
||||
user: {
|
||||
...note.user,
|
||||
notesCount: count,
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue