filiph/state_experiments

[question] Testing blocs

Opened this issue · 1 comments

I really love this example for blocs. Just wondering if you know any good resources or have any examples for unit testing the blocs, and the widgets that use StreamBuilder?

any examples for unit testing the blocs

I have an example here:
https://github.com/mono0926/wdb106-flutter/blob/master/test/bloc/items_bloc_test.dart

the widgets that use StreamBuilder

This test target widget trees are using StreamBuilder:
https://github.com/filiph/state_experiments/blob/master/shared/test/smoke_test.dart

await tester.pumpAndSettle(); is needed to wait for the next stream.