chore(search): remove unnecessary dependency

This commit is contained in:
Julien Dessaux 2025-02-25 22:24:38 +01:00
parent 1db6c64665
commit 87c244c4f5
Signed by: adyxax
GPG key ID: F92E51B86E07177E
3 changed files with 7 additions and 22 deletions

View file

@ -1,9 +1,8 @@
package main
import (
"slices"
"testing"
"github.com/stretchr/testify/require"
)
func TestNormalizeWords(t *testing.T) {
@ -18,7 +17,9 @@ func TestNormalizeWords(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
valid := normalizeWords(tc.input)
require.Equal(t, tc.expected, valid)
if slices.Compare(valid, tc.expected) != 0 {
t.Errorf("got %v, want %v", valid, tc.expected)
}
})
}
}
@ -37,7 +38,9 @@ func TestScoreIndex(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
valid := scoreIndex(tc.input, tc.index)
require.Equal(t, tc.expected, valid)
if valid != tc.expected {
t.Errorf("got %v, want %v", valid, tc.expected)
}
})
}
}