Skip to content

Commit 141ee97

Browse files
committed
Fix test by sorting test strings
1 parent 81f9c6f commit 141ee97

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

process_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"sort"
45
"testing"
56

67
"golang.org/x/exp/slices"
@@ -62,6 +63,8 @@ func TestParseNpmScripts(t *testing.T) {
6263
for _, c := range cmds {
6364
got = append(got, c.cmd)
6465
}
66+
sort.Strings(got)
67+
sort.Strings(tt.want)
6568
if !slices.Equal(got, tt.want) {
6669
t.Fatalf("parseNpmScripts(%q): got %v, want %v", tt.cmds, got, tt.want)
6770
}

0 commit comments

Comments
 (0)