Improve documentation of tests
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user