Skip to content

Commit

Permalink
test(api): Add unit test for Stream class
Browse files Browse the repository at this point in the history
- Added missing unit tests for the Stream class in the api module to ensure proper functionality and coverage.
  • Loading branch information
hanrw committed Jun 4, 2024
1 parent a92575f commit 88f8ff2
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ suspend inline fun <reified T> FlowCollector<T>.streamEventsFrom(response: HttpR
val json = json()
while (!channel.isClosedForRead) {
val line = channel.readUTF8Line() ?: continue
println("line: $line")
val value: T = when {
endStreamResponse(line) -> break
isStreamResponse(line) -> json.decodeFromString(line.removePrefix(STREAM_PREFIX)) // If the response indicates streaming data, decode and emit it.
Expand Down

0 comments on commit 88f8ff2

Please sign in to comment.