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

testing support #613

Closed
susonthapa opened this issue Aug 6, 2021 · 1 comment
Closed

testing support #613

susonthapa opened this issue Aug 6, 2021 · 1 comment

Comments

@susonthapa
Copy link

Coming from Android world, we used to have TestObservers with functions like assertValueCount. But I didn't find any such classes in RxDart (maybe I'm looking at the wrong place).
For testing I have used the test packages that supports stream testing and I have implemented few StreamMatchers. I was just curious if there is any official testing support in the library?

@hoc081098
Copy link
Collaborator

You can use Stream.length

final aStream = Stream.fromIterable([1, 2]);
expect(aStream.length, completion(2));

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

No branches or pull requests

2 participants