1 parent 4a3d51f commit 485bc66Copy full SHA for 485bc66
1 file changed
flatmap/map_test.go
@@ -2,6 +2,7 @@ package flatmap
2
3
import (
4
"reflect"
5
+ "sort"
6
"testing"
7
)
8
@@ -36,14 +37,18 @@ func TestMapKeys(t *testing.T) {
36
37
"bar.0.baz": "bar",
38
},
39
Output: []string{
- "foo",
40
"bar",
41
+ "foo",
42
43
44
}
45
46
for _, tc := range cases {
47
actual := Map(tc.Input).Keys()
48
+
49
+ // Sort so we have a consistent view of the output
50
+ sort.Strings(actual)
51
52
if !reflect.DeepEqual(actual, tc.Output) {
53
t.Fatalf("input: %#v\n\nbad: %#v", tc.Input, actual)
54
0 commit comments