felangel / felangel/bloc

feat: Test support for BlocObservers

Open
#4,203 14 comments 0 reactions 0 assignees View on GitHub
needs repro info question waiting for response
Dominant language
Dart
Stars
12.5k
Forks
3.4k
PR merge metrics
No merged PRs in 30d

Description

**Description**

ATM BlocObservers are being overriden in `blocTest` logic, and I'm not sure they work as expected when errors are thrown in them (for sure they aren't being outputted on the errors: matcher)

**Desired Solution**

Add another parameter to blocTest with the oberserver they should use, fully functional ones.

**Alternatives Considered**

I found workarounds (like defining them on build() everytime and using runZoneGuarded in tests), but I think this is a nice to have, and not that hard to implement neither.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.