diff --git a/js/summary_test.go b/js/summary_test.go index 1f8f97c10c4..bc8401f99d0 100644 --- a/js/summary_test.go +++ b/js/summary_test.go @@ -53,7 +53,6 @@ const ( func TestTextSummary(t *testing.T) { t.Parallel() - summary := createTestSummary(t) testCases := []struct { stats []string expected string @@ -70,6 +69,7 @@ func TestTextSummary(t *testing.T) { i, tc := i, tc t.Run(fmt.Sprintf("%d_%v", i, tc.stats), func(t *testing.T) { t.Parallel() + summary := createTestSummary(t) trendStats, err := json.Marshal(tc.stats) require.NoError(t, err) runner, err := getSimpleRunner( @@ -88,9 +88,9 @@ func TestTextSummary(t *testing.T) { require.Len(t, result, 1) stdout := result["stdout"] require.NotNil(t, stdout) - summary, err := ioutil.ReadAll(stdout) + summaryOut, err := ioutil.ReadAll(stdout) require.NoError(t, err) - assert.Equal(t, "\n"+tc.expected+"\n", string(summary)) + assert.Equal(t, "\n"+tc.expected+"\n", string(summaryOut)) }) } }