Skip to content

Commit

Permalink
Fix variable closure issue in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Mirić committed Nov 16, 2022
1 parent 1b19ae3 commit 77da6b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func TestReplacementPath_Param(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
if got := tt.r.Param(); got != tt.want {
Expand Down Expand Up @@ -80,6 +81,7 @@ func TestNewReplace(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
if got := NewReplace(tt.args.old, tt.args.new); !reflect.DeepEqual(got, tt.want) {
Expand Down
1 change: 1 addition & 0 deletions cmd/xk6/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func TestNormalizeImportPath(t *testing.T) {
tests = append(tests, windowsTests...)
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
if got := normalizeImportPath(tt.args.currentModule, tt.args.cwd, tt.args.moduleDir); got != tt.want {
Expand Down

0 comments on commit 77da6b6

Please sign in to comment.