on main help sign in
test(diffview): allow tests to run in parallel
commit7ee35973a216846d5e3cb85e57aa5f19cb769823 authorAndrey Nering <andreynering@users.noreply.github.com> dateThu 12 Jun 2025, 16:06 (1 year ago) parent3ece67a
1 file changed+12
internal/exp/diffview/diffview_test.go+12
internal/exp/diffview/diffview_test.go+12
@@ -133,6 +133,8 @@ func TestDiffView(t *testing.T) {
133133 t.Run(behaviorName, func(t *testing.T) {
134134 for themeName, themeFunc := range ThemeFuncs {
135135 t.Run(themeName, func(t *testing.T) {
136+ t.Parallel()
137+
136138 dv := diffview.New()
137139 dv = layoutFunc(dv)
138140 dv = themeFunc(dv)
@@ -158,6 +160,8 @@ func TestDiffView(t *testing.T) {
158160func TestDiffViewTabs(t *testing.T) {
159161 for layoutName, layoutFunc := range LayoutFuncs {
160162 t.Run(layoutName, func(t *testing.T) {
163+ t.Parallel()
164+
161165 dv := diffview.New().
162166 Before("main.go", TestTabsBefore).
163167 After("main.go", TestTabsAfter).
@@ -180,6 +184,8 @@ func TestDiffViewWidth(t *testing.T) {
180184 }
181185
182186 t.Run(fmt.Sprintf("WidthOf%03d", width), func(t *testing.T) {
187+ t.Parallel()
188+
183189 dv := diffview.New().
184190 Before("main.go", TestMultipleHunksBefore).
185191 After("main.go", TestMultipleHunksAfter).
@@ -203,6 +209,8 @@ func TestDiffViewHeight(t *testing.T) {
203209 t.Run(layoutName, func(t *testing.T) {
204210 for height := 1; height <= 20; height++ {
205211 t.Run(fmt.Sprintf("HeightOf%03d", height), func(t *testing.T) {
212+ t.Parallel()
213+
206214 dv := diffview.New().
207215 Before("main.go", TestMultipleHunksBefore).
208216 After("main.go", TestMultipleHunksAfter).
@@ -226,6 +234,8 @@ func TestDiffViewXOffset(t *testing.T) {
226234 t.Run(layoutName, func(t *testing.T) {
227235 for xOffset := range 21 {
228236 t.Run(fmt.Sprintf("XOffsetOf%02d", xOffset), func(t *testing.T) {
237+ t.Parallel()
238+
229239 dv := diffview.New().
230240 Before("main.go", TestDefaultBefore).
231241 After("main.go", TestDefaultAfter).
@@ -250,6 +260,8 @@ func TestDiffViewYOffset(t *testing.T) {
250260 t.Run(layoutName, func(t *testing.T) {
251261 for yOffset := range 17 {
252262 t.Run(fmt.Sprintf("YOffsetOf%02d", yOffset), func(t *testing.T) {
263+ t.Parallel()
264+
253265 dv := diffview.New().
254266 Before("main.go", TestMultipleHunksBefore).
255267 After("main.go", TestMultipleHunksAfter).