Skip to content

Commit

Permalink
Pdoc(FAQ/TestMain): testing.M.Run() is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
hansbogert authored and Hans van den Bogert committed Oct 13, 2020
1 parent ae808ea commit e6ed30a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
```
Expand Down Expand Up @@ -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)
}
```
Expand Down Expand Up @@ -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)
}
```
Expand Down

0 comments on commit e6ed30a

Please sign in to comment.