Search providers: SearXNG and Brave with ranking (#67)
CI / ci (push) Successful in 1m37s

Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
This commit was merged in pull request #67.
This commit is contained in:
2026-10-05 13:41:48 -04:00
committed by approver_agent
parent ec5b586c16
commit 2fb7807af3
7 changed files with 1041 additions and 1 deletions
+16
View File
@@ -114,6 +114,22 @@ func TestSimilar(t *testing.T) {
}
}
func TestSimilarity(t *testing.T) {
for _, tc := range []struct {
a, b string
want float64
}{
{"Easy Chicken Curry", "chicken curry", 1},
{"Thai Green Curry", "Chicken curry", 0.25},
{"Beef Stew", "Chicken curry", 0},
{"The Recipe", "chicken curry", 0},
} {
if got := Similarity(tc.a, tc.b); got != tc.want {
t.Errorf("Similarity(%q, %q) = %v, want %v", tc.a, tc.b, got, tc.want)
}
}
}
func TestDeduper(t *testing.T) {
d := NewDeduper(DedupeSources{
Regulars: []string{"Beef Tacos", "Spaghetti Bolognese"},