mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
test: pass languagesIds in getTrendingTagValues() function
This commit is contained in:
parent
d8b2c057b0
commit
7c29c81226
1 changed files with 3 additions and 1 deletions
|
|
@ -94,7 +94,9 @@ Deno.test("getTrendingTagValues(): 'e' tag and WITH language parameter", async (
|
||||||
.where('id', '=', post2.id)
|
.where('id', '=', post2.id)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
const trends = await getTrendingTagValues(db.kysely, ['e'], { kinds: [1, 7] }, 'pt');
|
const languagesIds = (await db.store.query([{ search: 'language:pt' }])).map((event) => event.id);
|
||||||
|
|
||||||
|
const trends = await getTrendingTagValues(db.kysely, ['e'], { kinds: [1, 7] }, languagesIds);
|
||||||
|
|
||||||
// portuguese post
|
// portuguese post
|
||||||
const expected = [{ value: post1.id, authors: numberOfAuthorsWhoLikedPost1, uses: post1uses }];
|
const expected = [{ value: post1.id, authors: numberOfAuthorsWhoLikedPost1, uses: post1uses }];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue