resetForTesting static method
Test-only reset. Drops the idempotency guard, puts back the log
manager MagicLogWatcher wrapped, AND restores the three
cross-package function pointers (pendingHttpCountReader,
recentLogsReader, recentExceptionsReader) to their tapir-side
missing-crumbs defaults so downstream tests that assert
"graceful-empty" behavior do not see leaked bindings from a prior
install call. The contract on each pointer is set-once-per-isolate
during install + reset-on-resetForTesting.
Does NOT unregister the adapters/watchers ; CrumbsPlugin keeps
them in its internal lists; tests should call
CrumbsStore.resetForTesting to clear the buffers and rely on
per-test setUp to construct fresh integration instances.
Implementation
@visibleForTesting
static void resetForTesting() {
_installed = false;
MagicLogWatcher().uninstall();
pendingHttpCountReader = () => 0;
recentLogsReader = (ConsoleRequest request) => const [];
recentExceptionsReader = (ExceptionsRequest request) => const [];
}