Currently, this package warns the developer if a Observer is being used without any observables inside it's build method. It can be quite useful during development, but it sends a lot of messages during tests, example (the real output have thousands of occurrences):
00:01 +4: ~/test/app/shared/components/timesheet_timer_test.dart: Should not load the timer when disabled
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build (~/app/shared/components/timesheet/timesheet_timer.dart:75:12)
00:01 +5: ~/test/app/shared/components/timesheet_timer_test.dart: Should have a start timer button when timer is not running
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build (~/app/shared/components/timesheet/timesheet_timer.dart:75:12)
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build.<anonymous closure> (~/app/shared/components/timesheet/timesheet_timer.dart:99:13)
00:02 +6: ~/test/app/shared/components/timesheet_timer_test.dart: Should have a stop timer button when timer is running
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build (~/app/shared/components/timesheet/timesheet_timer.dart:75:12)
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build.<anonymous closure> (~/app/shared/components/timesheet/timesheet_timer.dart:99:13)
00:02 +7: ~/test/app/shared/components/timesheet_timer_test.dart: Should start the timer when tap
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build (~/app/shared/components/timesheet/timesheet_timer.dart:75:12)
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build.<anonymous closure> (~/app/shared/components/timesheet/timesheet_timer.dart:99:13)
00:02 +8: ~/test/app/shared/components/timesheet_timer_test.dart: Should stop the timer when tap
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build (~/app/shared/components/timesheet/timesheet_timer.dart:75:12)
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build.<anonymous closure> (~/app/shared/components/timesheet/timesheet_timer.dart:99:13)
00:02 +9: ~/test/app/shared/components/timesheet_timer_test.dart: Should reset the timer when tap
No observables detected in the build method of Observer
#3 _TimesheetTimerState.build (~/app/shared/components/timesheet/timesheet_timer.dart:75:12)
No observables detected in the build method of Observer
While inside a test, the widget actually communicates with a mock rather than an actual observable. There's no way to hide this message, and the test output becomes a lot bigger.
My suggestion is to add an API to disable these messages at runtime, example:
FlutterMobx.disableNoObservablesWarning = true;
Currently, this package warns the developer if a Observer is being used without any observables inside it's build method. It can be quite useful during development, but it sends a lot of messages during tests, example (the real output have thousands of occurrences):
While inside a test, the widget actually communicates with a mock rather than an actual observable. There's no way to hide this message, and the test output becomes a lot bigger.
My suggestion is to add an API to disable these messages at runtime, example:
FlutterMobx.disableNoObservablesWarning = true;