Skip to content

Commit

Permalink
Fix test by sorting test strings
Browse files Browse the repository at this point in the history
  • Loading branch information
rosszurowski committed Jan 12, 2023
1 parent 81f9c6f commit 141ee97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions process_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"sort"
"testing"

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

0 comments on commit 141ee97

Please sign in to comment.