From 77bf3a4a92f9e7f75e7fdf0e791c0be80e7c43d3 Mon Sep 17 00:00:00 2001 From: Andriy Oblivantsev Date: Tue, 7 Feb 2023 05:30:10 +0000 Subject: [PATCH] Improve documentation of tests --- pkg/deesee/filter_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/deesee/filter_test.go b/pkg/deesee/filter_test.go index 10987f6..9df500a 100644 --- a/pkg/deesee/filter_test.go +++ b/pkg/deesee/filter_test.go @@ -12,6 +12,7 @@ func TestFilterBySuperPowers(t *testing.T) { t.Errorf("Expected GetModuleRootPath to return module root path, got error: %v", err) return } + persons, err := Load(rootPath + "/data/heros.json") if err != nil { t.Errorf("Expected Load to return persons, got error: %v", err) @@ -27,6 +28,7 @@ func TestFilterBySuperPowers(t *testing.T) { if len(SearchByPowers(persons, []string{"healing"})) < 1 { t.Errorf("Expected at least one person with healing superpower, got none") } + // Test with valid and invalid if len(SearchByPowers(persons, []string{"healing", "slowpoking"})) < 1 { t.Errorf("Expected at least one person with healing superpower, got none")