resetEarlyErrorHandlersForTest function
Resets the early-error buffer state for tests. The buffer and the installed-flag are module-level statics that persist across test cases in one VM, so without a reset the buffer/flush assertions become order- dependent (Issue 63).
Implementation
@visibleForTesting
void resetEarlyErrorHandlersForTest() {
_earlyErrorBuffer.clear();
}