Skip to content

Refactor state_controller.dart: Ignore error and stack trace in setSt… #52

Refactor state_controller.dart: Ignore error and stack trace in setSt…

Refactor state_controller.dart: Ignore error and stack trace in setSt… #52

GitHub Actions / Test Report succeeded Oct 16, 2024 in 1s

40 passed, 0 failed and 0 skipped

Tests passed successfully

✅ tests.json

40 tests were completed in 10s with 40 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
test/control_test.dart 40✅ 943ms

✅ test/control_test.dart

unit HandlerContext
  ✅ FakeControllers
widget StateConsumer -  base - 
  ✅ should update controller when widget controller changes
  ✅ should not rebuild when states are identical in _valueChanged
  ✅ should not rebuild when buildWhen returns false
  ✅ should use child if builder is not provided
  ✅ should rebuild with widget child if both builder and child are provided
widget ControllerScope ControllerScope.value
  ✅ constructor
  ✅ inject_and_recive
unit StateController concurrency
  ✅ sequential
  ✅ droppable
  ✅ concurrent
widget ControllerScope ControllerScope.create
  ✅ constructor
  ✅ inject_and_recive
unit StateController exceptional
  ✅ throws if dispose called multiple times
  ✅ handles edge case of adding large values
  ✅ handles edge case of subtracting large values
  ✅ processes multiple operations efficiently
  ✅ should correctly manage multiple listeners
widget ControllerScope ControllerScope.additional
  ✅ controllerOf should return the correct controller
  ✅ maybeOf should return null if no controller is found
  ✅ maybeOf should return controller if present
  ✅ _notFoundInheritedWidgetOfExactType should throw error
  ✅ updateShouldNotify should return true for different dependencies
  ✅ debugFillProperties should correctly fill debug information
  ✅ _initController should initialize correctly
  ✅ _initController should throw error on reinitialization
unit StateController assertion
  ✅ should assert when notifyListeners called on disposed controller
  ✅ should assert when addListener called on disposed controller
widget StateConsumer -  debugFillProperties - 
  ✅ should fill full debug properties correctly
  ✅ should fill debug properties correctly
unit StateController methods
  ✅ merge
  ✅ toStream
  ✅ toValueListenable
widget StateConsumer -  didUpdateWidget - 
  ✅ should use controller from ControllerScope when newController is null
unit StateController onError sequential
  ✅ should call onError and error callback when an exception is thrown
  ✅ should execute handler, handle errors, and call done callback within runZonedGuarded
unit StateController onError droppable
  ✅ should call onError and error callback when an exception is thrown
  ✅ should execute handler, handle errors, and call done callback within runZonedGuarded
unit StateController onError concurrent
  ✅ should call onError and error callback when an exception is thrown
  ✅ should execute handler, handle errors, and call done callback within runZonedGuarded