Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit documentation #161

Merged
merged 1 commit into from Nov 3, 2022
Merged

Conversation

jingibus
Copy link
Collaborator

No description provided.

Copy link
Member

@JakeWharton JakeWharton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice

}
```

Like `test`, `testIn` produces a `ReceiveTurbine`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReceiveTurbine as a type was not mentioned above in the test section.

That section probably just needs a quick tweak like

Then it calls the validation block, passing in the read-only interface ReceiveTurbine as the receiver:

README.md Outdated
Comment on lines 214 to 223
While flow termination is exposed as an event, it is not really an event: it's a state that the flow is in.
So completion or error events can be observed multiple times.

```kotlin
flow<Nothing> { throw RuntimeException("broken!") }.test {
awaitError()
awaitError()
awaitError()
}
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether this meets that bar for the intro/README. It's a great snippet to put on the kdoc of each of these functions (which we should do no matter what), but I'm unsure as to whether it's something important enough to actively communicate here. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. I was very worried about this README getting too long, so.... happy to have a reason to delete something

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already documented well enough, I think:

  /**
   * Assert that the next event received was an error terminating the flow.
   * This function will suspend if no events have been received.
   *
   * When this [ReceiveTurbine] is in a terminal state ([Event.Complete] or [Event.Error], this method
   * will yield the same result every time it is called.
   *
   * @throws AssertionError if the next event was an item or completion.
   */

@jingibus jingibus force-pushed the wphillips/2022-10-13/update-documentation branch from e80858c to d398b12 Compare November 3, 2022 15:35
@jingibus jingibus merged commit 2518ea0 into trunk Nov 3, 2022
@jingibus jingibus deleted the wphillips/2022-10-13/update-documentation branch November 3, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants