setActiveReporterForTest function

  1. @visibleForTesting
void setActiveReporterForTest(
  1. ErrorReporter? reporter
)

Test-only seam: install a reporter as the active chokepoint target without running the whole appInitErrorHandling branch, so _recordErrorSafe's attached-vs-buffering split can be exercised in isolation. Pass null to simulate the pre-attach (unattached) state.

Implementation

@visibleForTesting
void setActiveReporterForTest(ErrorReporter? reporter) {
  _activeReporter = reporter;
}