clearContext function

void clearContext([
  1. TestContext? only
])

Drops the isolate-wide pin (plugin tier).

When only is set, clears only if that instance is still the pin — so a concurrent peer's teardown does not wipe another live test's fallback.

Implementation

void clearContext([TestContext? only]) {
  if (only != null && !identical(_isolateContext, only)) return;
  _isolateContext = null;
}