mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Improve staging panel integration tests
This commit is contained in:
@ -61,6 +61,11 @@ func (self *matcher) Contains(target string) *matcher {
|
||||
return self.appendRule(matcherRule{
|
||||
name: fmt.Sprintf("contains '%s'", target),
|
||||
testFn: func(value string) (bool, string) {
|
||||
// everything contains the empty string so we unconditionally return true here
|
||||
if target == "" {
|
||||
return true, ""
|
||||
}
|
||||
|
||||
return strings.Contains(value, target), fmt.Sprintf("Expected '%s' to be found in '%s'", target, value)
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user