Skip to content

Commit c83ae9b

Browse files
committed
Omit the module name on complete paths for tests
1 parent fe58065 commit c83ae9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Testing/Events/Recorder/Event.HumanReadableOutputRecorder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ extension Event {
187187
/// - Returns: The fully qualified name, with display name substituted if
188188
/// available.
189189
private func fullyQualifiedName(for failedTest: FailedTest) -> String {
190-
var name = failedTest.path.joined(separator: "/")
190+
var name = failedTest.path.dropFirst().joined(separator: "/")
191191

192192
// Use display name for the last component if available
193193
if let displayName = failedTest.displayName, !failedTest.path.isEmpty {
194-
let pathWithoutLast = failedTest.path.dropLast()
194+
let pathWithoutLast = failedTest.path.dropFirst().dropLast()
195195
name = (pathWithoutLast + [#""\#(displayName)""#]).joined(separator: "/")
196196
}
197197

0 commit comments

Comments
 (0)