From 027a1abf0e99809f5c1ed872f1fd489b9196e65f Mon Sep 17 00:00:00 2001 From: Hans van den Bogert Date: Wed, 14 Oct 2020 07:30:45 +0200 Subject: [PATCH] Pdoc(FAQ/TestMain): `testing.M.Run()` is optional (#353) --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 9f18001..3e8bfe1 100644 --- a/README.md +++ b/README.md @@ -355,9 +355,11 @@ func TestMain(m *testing.M) { Options: &opts, }.Run() + // Optional: Run `testing` package's logic besides godog. if st := m.Run(); st > status { status = st } + os.Exit(status) } ``` @@ -386,9 +388,11 @@ func TestMain(m *testing.M) { Options: &opts, }.Run() + // Optional: Run `testing` package's logic besides godog. if st := m.Run(); st > status { status = st } + os.Exit(status) } ``` @@ -417,9 +421,11 @@ func TestMain(m *testing.M) { Options: &opts, }.Run() + // Optional: Run `testing` package's logic besides godog. if st := m.Run(); st > status { status = st } + os.Exit(status) } ```