Add @sofa/native Expo React Native app (#7)

This commit is contained in:
2026-03-12 19:39:54 -04:00
committed by GitHub
parent a326c968b7
commit 83839a0cd7
130 changed files with 9015 additions and 971 deletions
+22
View File
@@ -336,4 +336,26 @@ describe("getRecommendationsForTitle", () => {
const recs = getRecommendationsForTitle("m1");
expect(recs).toHaveLength(0);
});
test("deduplicates titles returned by multiple recommendation sources", () => {
insertTitle({ id: "m1", tmdbId: 1 });
insertTitle({ id: "rec1", tmdbId: 10, title: "Rec One" });
insertTitle({ id: "rec2", tmdbId: 20, title: "Rec Two" });
insertRecommendation("m1", "rec1", {
source: "tmdb_similar",
rank: 1,
});
insertRecommendation("m1", "rec1", {
source: "tmdb_recommendations",
rank: 2,
});
insertRecommendation("m1", "rec2", {
source: "tmdb_recommendations",
rank: 3,
});
const recs = getRecommendationsForTitle("m1");
expect(recs).toHaveLength(2);
expect(recs.map((rec) => rec.id)).toEqual(["rec1", "rec2"]);
});
});