mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Fix wrong test assertion text
If a `t.FileSystem().FileContent("file.txt", Equals("bla"))` assertion fails because the file doesn't exist, the error would say Expected path 'file.txt' to not exist, but it does which is very confusing.
This commit is contained in:
parent
db40653202
commit
ccd39bb8ae
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ func (self *FileSystem) FileContent(path string, matcher *TextMatcher) {
|
|||
self.assertWithRetries(func() (bool, string) {
|
||||
_, err := os.Stat(path)
|
||||
if os.IsNotExist(err) {
|
||||
return false, fmt.Sprintf("Expected path '%s' to not exist, but it does", path)
|
||||
return false, fmt.Sprintf("Expected path '%s' to exist, but it does not", path)
|
||||
}
|
||||
|
||||
output, err := os.ReadFile(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue