topLevelTestName extracts the suite/top-level test name from a test name. For "TestSuiteV0/TestMethod" returns "TestSuiteV0". For "TestFoo" (no slash) returns "TestFoo".
(name string)
| 50 | // For "TestSuiteV0/TestMethod" returns "TestSuiteV0". |
| 51 | // For "TestFoo" (no slash) returns "TestFoo". |
| 52 | func topLevelTestName(name string) string { |
| 53 | if before, _, ok := strings.Cut(name, "/"); ok { |
| 54 | return before |
| 55 | } |
| 56 | return name |
| 57 | } |
| 58 | |
| 59 | // isGoTestSuite returns true if the name looks like a Go testify suite name |
| 60 | // (starts with "Test" and contains "Suite"). |
no outgoing calls
no test coverage detected