mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Fix trends test
This commit is contained in:
parent
cce693dc9b
commit
c7264d7627
1 changed files with 20 additions and 12 deletions
|
|
@ -16,10 +16,12 @@ Deno.test("getTrendingTagValues(): 'e' tag and WITHOUT language parameter", asyn
|
||||||
const post1uses = numberOfAuthorsWhoLikedPost1 * post1multiplier;
|
const post1uses = numberOfAuthorsWhoLikedPost1 * post1multiplier;
|
||||||
for (let i = 0; i < numberOfAuthorsWhoLikedPost1; i++) {
|
for (let i = 0; i < numberOfAuthorsWhoLikedPost1; i++) {
|
||||||
const sk = generateSecretKey();
|
const sk = generateSecretKey();
|
||||||
|
for (let j = 0; j < post1multiplier; j++) {
|
||||||
events.push(
|
events.push(
|
||||||
genEvent({ kind: 7, content: '+', tags: Array(post1multiplier).fill([...['e', post1.id]]) }, sk),
|
genEvent({ kind: 7, content: '+', tags: [['e', post1.id, `${j}`]] }, sk),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
events.push(post1);
|
events.push(post1);
|
||||||
|
|
||||||
sk = generateSecretKey();
|
sk = generateSecretKey();
|
||||||
|
|
@ -29,10 +31,12 @@ Deno.test("getTrendingTagValues(): 'e' tag and WITHOUT language parameter", asyn
|
||||||
const post2uses = numberOfAuthorsWhoLikedPost2 * post2multiplier;
|
const post2uses = numberOfAuthorsWhoLikedPost2 * post2multiplier;
|
||||||
for (let i = 0; i < numberOfAuthorsWhoLikedPost2; i++) {
|
for (let i = 0; i < numberOfAuthorsWhoLikedPost2; i++) {
|
||||||
const sk = generateSecretKey();
|
const sk = generateSecretKey();
|
||||||
|
for (let j = 0; j < post2multiplier; j++) {
|
||||||
events.push(
|
events.push(
|
||||||
genEvent({ kind: 7, content: '+', tags: Array(post2multiplier).fill([...['e', post2.id]]) }, sk),
|
genEvent({ kind: 7, content: '+', tags: [['e', post2.id, `${j}`]] }, sk),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
events.push(post2);
|
events.push(post2);
|
||||||
|
|
||||||
for (const event of events) {
|
for (const event of events) {
|
||||||
|
|
@ -62,10 +66,12 @@ Deno.test("getTrendingTagValues(): 'e' tag and WITH language parameter", async (
|
||||||
const post1uses = numberOfAuthorsWhoLikedPost1 * post1multiplier;
|
const post1uses = numberOfAuthorsWhoLikedPost1 * post1multiplier;
|
||||||
for (let i = 0; i < numberOfAuthorsWhoLikedPost1; i++) {
|
for (let i = 0; i < numberOfAuthorsWhoLikedPost1; i++) {
|
||||||
const sk = generateSecretKey();
|
const sk = generateSecretKey();
|
||||||
|
for (let j = 0; j < post1multiplier; j++) {
|
||||||
events.push(
|
events.push(
|
||||||
genEvent({ kind: 7, content: '+', tags: Array(post1multiplier).fill([...['e', post1.id]]) }, sk),
|
genEvent({ kind: 7, content: '+', tags: [['e', post1.id, `${j}`]] }, sk),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
events.push(post1);
|
events.push(post1);
|
||||||
|
|
||||||
sk = generateSecretKey();
|
sk = generateSecretKey();
|
||||||
|
|
@ -74,10 +80,12 @@ Deno.test("getTrendingTagValues(): 'e' tag and WITH language parameter", async (
|
||||||
const post2multiplier = 1;
|
const post2multiplier = 1;
|
||||||
for (let i = 0; i < numberOfAuthorsWhoLikedPost2; i++) {
|
for (let i = 0; i < numberOfAuthorsWhoLikedPost2; i++) {
|
||||||
const sk = generateSecretKey();
|
const sk = generateSecretKey();
|
||||||
|
for (let j = 0; j < post2multiplier; j++) {
|
||||||
events.push(
|
events.push(
|
||||||
genEvent({ kind: 7, content: '+', tags: Array(post2multiplier).fill([...['e', post2.id]]) }, sk),
|
genEvent({ kind: 7, content: '+', tags: [['e', post2.id, `${j}`]] }, sk),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
events.push(post2);
|
events.push(post2);
|
||||||
|
|
||||||
for (const event of events) {
|
for (const event of events) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue