Closed Albert221 closed 4 years ago
Hi, @Albert221
If I change wait: const Duration(milliseconds: 300)
to wait: const Duration(milliseconds: 305)
I can pass the test.
I think the time is not so precise because of the dart event loop.
Yes, that's right, but I think that's not the wanted behavior. Maybe we can somehow make it pass with microtasks or some other stuff under the hood.
I checked the source code. I don’t think it is necessary. There are a lot of Futures in the execution process, and Futures are event loops. Event loops are first come first served. To be honest, even if such a specific problem is solved, It may not satisfy other examples.
Hi @Albert221 👋 Thanks for opening an issue!
This will be resolved in v6.0.0 and is likely related to https://github.com/felangel/bloc/issues/1415.
Description
I get
Bad state: Cannot add new events after calling close (...)
on tests that usetransformEvents
.To reproduce
Run the code below. See how the second test fails. Now comment whole
transformEvents
overriden method and run tests again. They pass.Expected behavior
Both tests pass.
Logs