From 90ff748fa32bddd6dd29fd27d74f5b75cd55a2e6 Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Sun, 25 Sep 2022 16:01:46 +0000 Subject: [PATCH] fixed test --- scraping_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scraping_test.go b/scraping_test.go index bcf4f4f..caf9be0 100644 --- a/scraping_test.go +++ b/scraping_test.go @@ -245,7 +245,7 @@ func TestFilterSubstring(t *testing.T) { getFilterResultSubstring( &filter, ) - if filter.Results[0] != test.Want { + if len(filter.Results) > 0 && filter.Results[0] != test.Want { t.Errorf("Got %s, want %s", filter.Results, test.Want) } })