Conditions | 5 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package langset |
||
18 | func TestFileExists(t *testing.T) { |
||
19 | t.Run("fileExists return false if file doesn't exist", func(test *testing.T) { |
||
20 | result, _ := fileExists("somerandompath") |
||
21 | |||
22 | if result { |
||
23 | t.Error("Function fileExists must return false, because filepath points to a file that doesn't exist") |
||
24 | } |
||
25 | }) |
||
26 | |||
27 | t.Run("fileExists return true if file exist", func(test *testing.T) { |
||
28 | result, _ := fileExists("timeago.go") |
||
29 | |||
30 | if result == false { |
||
31 | t.Error("Function fileExists must return true, because filepath points to a file that exists") |
||
32 | } |
||
48 |