Skip to content

Commit

Permalink
fix: a tedious error (in indeterministic unit test) has been fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoehabb committed Dec 23, 2024
1 parent b0c4cda commit 9ce9716
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/models/tests/topics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,18 @@ describe("Topics", () => {

describe(nameof(topics.isExistsBatch), () => {
it("should return a map that tells if the passed topic ids exists in the db or not.", async () => {
const topic1 = await fixtures.topic();
const topic2 = await fixtures.topic();
const topic1 = await fixtures.topic({
name: {
ar: "dump-topic-name-ar",
en: "dump-topic-name-en",
}
});
const topic2 = await fixtures.topic({
name: {
ar: "another-dump-topic-name-ar",
en: "another-dump-topic-name-en",
}
});

const list = [topic1.id, topic2.id, 123];
const existanceMap = await topics.isExistsBatch(list);
Expand Down

0 comments on commit 9ce9716

Please sign in to comment.