[Question] How to proper test bloc.js
Lonli-Lokli opened this issue ยท 3 comments
Lonli-Lokli commented
As a continuation of previous issue, There some async blocs.
What are the possible ways to write verification tests that with the given initial state and input event I will get known number of output states, ended with some specific one?
felangel commented
Hi @Lonli-Lokli ๐
Thanks for opening an issue!
You can check out the bloc tests at
bloc.js/packages/bloc/test/bloc.test.ts
Line 75 in 8980710
Lonli-Lokli commented
Thanks! So with your proposal it's required to complete the bloc stream.
felangel commented
@Lonli-Lokli yup so that you know for sure that no more states are emitted ๐