From 495c6e6e75a11469ebdf417025fc68c0272046db Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 14 Sep 2024 17:06:10 -0300 Subject: [PATCH] negentropy: test lists equality instead of matching elements. --- nip77/negentropy/whatever_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nip77/negentropy/whatever_test.go b/nip77/negentropy/whatever_test.go index e41a6bf..3d6d11b 100644 --- a/nip77/negentropy/whatever_test.go +++ b/nip77/negentropy/whatever_test.go @@ -144,7 +144,7 @@ func runTestWith(t *testing.T, haves = append(haves, item) } slices.Sort(haves) - require.ElementsMatch(t, expectedHave, haves, "wrong have") + require.Equal(t, expectedHave, haves, "wrong have") }() go func() { @@ -163,7 +163,7 @@ func runTestWith(t *testing.T, havenots = append(havenots, item) } slices.Sort(havenots) - require.ElementsMatch(t, expectedNeed, havenots, "wrong need") + require.Equal(t, expectedNeed, havenots, "wrong need") }() wg.Wait()