fix test/e2e/antennas.ts
This commit is contained in:
parent
2175181fa6
commit
7a2958f356
3 changed files with 22 additions and 19 deletions
|
|
@ -9,7 +9,7 @@
|
|||
import * as assert from 'assert';
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
import { Redis } from 'ioredis';
|
||||
import { api, post, randomString, sendEnvUpdateRequest, signup, uploadUrl } from '../utils.js';
|
||||
import { api, post, randomString, sendEnvUpdateRequest, signup, uploadUrl, withNotesCount } from '../utils.js';
|
||||
import { loadConfig } from '@/config.js';
|
||||
|
||||
function genHost() {
|
||||
|
|
@ -20,21 +20,6 @@ function waitForPushToTl() {
|
|||
return setTimeout(500);
|
||||
}
|
||||
|
||||
// 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
|
||||
function withNotesCount(notes, count) {
|
||||
return notes.map( note => {
|
||||
return {
|
||||
...note,
|
||||
user: {
|
||||
...note.user,
|
||||
notesCount: count,
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
let redisForTimelines: Redis;
|
||||
|
||||
describe('Timelines', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue