Open yashasolutions opened 2 years ago
Hi,
I am testing a very basic cobra root command,
package cmd import ( "github.com/spf13/cobra" ) func NewRootCmd() *cobra.Command { return &cobra.Command{ Use: "mycommand", Short: "mycommand", Long: "mycommand", Run: func(cmd *cobra.Command, args []string) { // Do Stuff Here }, } }
package cmd import ( "testing" . "github.com/smartystreets/goconvey/convey" ) func TestRoot(t *testing.T) { Convey("Given the root command", t, func() { cmd := NewRootCmd() Convey("The command should return Nil", func() { So(cmd.Execute(), ShouldBeNil) }) }) }
If I run go test it passes.
go test
\>$ go test . 1 total assertion PASS ok myproject/cmd 0.002s
but in the browser I get:
Documentation does not state that terminal or browser should be different.
Did I miss something somewhere?
Hi,
I am testing a very basic cobra root command,
If I run
go test
it passes.but in the browser I get:
Documentation does not state that terminal or browser should be different.
Did I miss something somewhere?