feat: add support for path arg in miro test

This commit is contained in:
2026-03-20 21:43:50 +00:00
parent b1061ee1af
commit 705933726e
4 changed files with 221 additions and 48 deletions
+11 -4
View File
@@ -1,6 +1,8 @@
package cmd
import (
"path/filepath"
"miro/internal/miro"
"github.com/spf13/cobra"
@@ -8,10 +10,15 @@ import (
func newTestCommand() *cobra.Command {
return &cobra.Command{
Use: "test",
Args: cobra.NoArgs,
RunE: func(_ *cobra.Command, _ []string) error {
return miro.RunTests()
Use: "test [path]",
Args: cobra.MaximumNArgs(1),
RunE: func(_ *cobra.Command, args []string) error {
path := ""
if len(args) == 1 {
path = filepath.Clean(args[0])
}
return miro.RunTests(path)
},
}
}