fix: test hardening

This commit is contained in:
2026-02-15 22:07:36 +01:00
parent 8b938f4241
commit 70fc714df5
3 changed files with 47 additions and 1 deletions

View File

@@ -192,7 +192,10 @@ export class TagEngine extends EventEmitter {
tagName: string,
transform: (postTags: string[]) => string[]
): Promise<{ total: number; process: (onEachUpdated: (updated: number, total: number) => void) => Promise<number> }> {
const postsToUpdate = await this.queryPostsContainingTag(tagName);
const rawPostsToUpdate = await this.queryPostsContainingTag(tagName);
const postsToUpdate = Array.from(
new Map(rawPostsToUpdate.map((row) => [row.postId, row])).values()
);
const total = postsToUpdate.length;
return {