Skip to content

Commit

Permalink
Update testing.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c committed Dec 11, 2023
1 parent 8b34fb1 commit 93aef79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/leak_tracker_flutter_testing/lib/src/testing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void maybeSetupLeakTrackingForTest(

/// If leak tracking is enabled, stops it and declares notDisposed objects as leaks.
void maybeTearDownLeakTrackingForTest() {
if (LeakTracking.phase.ignoreLeaks) return;
if (!LeakTracking.isStarted || LeakTracking.phase.ignoreLeaks) return;
LeakTracking.phase = const PhaseSettings.ignored();
LeakTracking.declareNotDisposedObjectsAsLeaks();
}
Expand Down

0 comments on commit 93aef79

Please sign in to comment.