Skip to content

Commit

Permalink
Add a failure message to transcribe streaming test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelkins committed Jan 16, 2025
1 parent 0927bdb commit 64b60ed
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ final class TranscribeStreamingTests: XCTestCase {
"Hello transcribed streaming from swift sdk.",
"Hello transcribes streaming from Swift SDK.",
]
XCTAssertTrue(candidates.contains(where: { $0.lowercased() == fullMessage.lowercased() }))
XCTAssertTrue(
candidates.contains { $0.lowercased() == fullMessage.lowercased() },
"The transcription \"\(fullMessage)\" does not match any of the expected forms: [\(candidates.map { "\"\($0)\"" }.joined(separator: ", "))]"
)
}

// Performs the stream transcription, with retry for selected errors associated with
Expand Down

0 comments on commit 64b60ed

Please sign in to comment.