Skip to content

Commit 7a210a8

Browse files
committed
refactor(tests): cleanup formatting
1 parent 58dcc8b commit 7a210a8

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

internal/goutils/slices_test.go

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,36 @@ func Test_Contains(t *testing.T) {
5757
isCaseSensitive bool
5858
want bool
5959
}{
60-
"not_case_sensitive_success": {listToCheck: []string{"hi", "hey"}, toFind: "Hey", isCaseSensitive: false, want: true},
61-
"case_sensitive_success": {listToCheck: []string{"hi", "Hey"}, toFind: "Hey", isCaseSensitive: true, want: true},
62-
"case_sensitive_fail": {listToCheck: []string{"hi", "hey", "hello", "apple", "pear"}, toFind: "Hey", isCaseSensitive: true, want: false},
63-
"not_case_sensitive_fail": {listToCheck: []string{"hi", "hey", "hello", "apple", "pear"}, toFind: "Peach", isCaseSensitive: false, want: false},
64-
"not_case_sensitive_substring": {listToCheck: []string{"hi", "hey hello"}, toFind: "hey", isCaseSensitive: false, want: false},
60+
"not_case_sensitive_success": {
61+
listToCheck: []string{"hi", "hey"},
62+
toFind: "Hey",
63+
isCaseSensitive: false,
64+
want: true,
65+
},
66+
"case_sensitive_success": {
67+
listToCheck: []string{"hi", "Hey"},
68+
toFind: "Hey",
69+
isCaseSensitive: true,
70+
want: true,
71+
},
72+
"case_sensitive_fail": {
73+
listToCheck: []string{"hi", "hey", "hello", "apple", "pear"},
74+
toFind: "Hey",
75+
isCaseSensitive: true,
76+
want: false,
77+
},
78+
"not_case_sensitive_fail": {
79+
listToCheck: []string{"hi", "hey", "hello", "apple", "pear"},
80+
toFind: "Peach",
81+
isCaseSensitive: false,
82+
want: false,
83+
},
84+
"not_case_sensitive_substring": {
85+
listToCheck: []string{"hi", "hey hello"},
86+
toFind: "hey",
87+
isCaseSensitive: false,
88+
want: false,
89+
},
6590
}
6691
for name, tc := range tests {
6792
t.Run(name, func(t *testing.T) {

0 commit comments

Comments
 (0)