From b35fc94fa55a0e02cb2416f9c450b91b8a936e69 Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Wed, 4 Mar 2020 22:16:20 -0700 Subject: [PATCH] Remove TestMain call --- suite_test.go | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/suite_test.go b/suite_test.go index aabffe4..9d2f71d 100644 --- a/suite_test.go +++ b/suite_test.go @@ -1,45 +1,5 @@ package godog -import ( - "os" - "strings" - "testing" - "time" -) - -func TestMain(m *testing.M) { - format := "progress" // non verbose mode - concurrency := 4 - - var specific bool - for _, arg := range os.Args[1:] { - if arg == "-test.v=true" { // go test transforms -v option - verbose mode - format = "pretty" - concurrency = 1 - break - } - if strings.Index(arg, "-test.run") == 0 { - specific = true - } - } - var status int - if !specific { - status = RunWithOptions("godog", func(s *Suite) { - GodogContext(s) - }, Options{ - Format: format, // pretty format for verbose mode, otherwise - progress - Paths: []string{"features"}, - Concurrency: concurrency, // concurrency for verbose mode is 1 - Randomize: time.Now().UnixNano(), // randomize scenario execution order - }) - } - - if st := m.Run(); st > status { - status = st - } - os.Exit(status) -} - // needed in order to use godog cli func GodogContext(s *Suite) { SuiteContext(s)