resetJIntentGlobals function

void resetJIntentGlobals()

Restores JIntent's process-wide state to its defaults.

Resets JObserver (registered observers and static callbacks), JEffectsConfig, JMetrics and EitherConfig. Call it from setUp or tearDown so global configuration cannot leak between tests.

Implementation

void resetJIntentGlobals() {
  JObserver.reset();
  JEffectsConfig().reset();
  JMetrics.reset();
  EitherConfig.errorLogger = null;
}