feat: add parallel test execution to improve runtime (#1882)

This commit is contained in:
christiandins
2024-12-12 01:47:10 +01:00
committed by GitHub
parent b9a5d1c573
commit 4dffab2e0a
14 changed files with 441 additions and 34 deletions

View File

@@ -12,6 +12,8 @@ import (
)
func TestArgs(t *testing.T) {
t.Parallel()
tests := []struct {
Args []string
ExpectedCalls []*ast.Call
@@ -97,6 +99,8 @@ func TestArgs(t *testing.T) {
for i, test := range tests {
t.Run(fmt.Sprintf("TestArgs%d", i+1), func(t *testing.T) {
t.Parallel()
calls, globals := args.Parse(test.Args...)
assert.Equal(t, test.ExpectedCalls, calls)
if test.ExpectedGlobals.Len() > 0 || globals.Len() > 0 {