INNER CODE UNIT · Go
TestRunCommand
cristianoliveira/ergo · main_test.go:337
func TestRunCommand(t *testing.T) {
commandName := "RunCommand"
t.Run("runs", func(tt *testing.T) {
args := []string{"ergo", "run"}
command, config := prepareSubCommand(args)
if command == nil || config == nil {
tt.Fatalf("Expected command to be nil got %v", command)
}
commandType := reflect.TypeOf(command).Name()
if commandType != commandName {
tt.Fatalf("Expected result to be equal %s got %s", commandName, commandType)
}
})
}