Conditions | 6 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package timeago |
||
5 | func TestGetTimeTranslations(t *testing.T) { |
||
6 | t.Parallel() |
||
7 | |||
8 | t.Run("returns 7 items", func(test *testing.T) { |
||
9 | if res := len(getTimeTranslations()); res != 7 { |
||
10 | test.Errorf("Must return 7 items but got %d", res) |
||
11 | } |
||
12 | }) |
||
13 | |||
14 | t.Run("every slice has 3 items", func(test *testing.T) { |
||
15 | for _, slice := range getTimeTranslations() { |
||
16 | if res := len(slice); res != 3 { |
||
17 | test.Errorf("Slice Must return 3 items but got %d", res) |
||
18 | } |
||
22 |