Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 75d4064

Browse files
committed
fix(mock): Timer.isActive should be false after running callback
For non-periodic timers, isActive should be false after running the timer function. https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-async.Timer#id_isActive
1 parent 4b6c45e commit 75d4064

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/mock/zone.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ void clockTick({int days: 0,
152152
if (spec.duration <= Duration.ZERO) {
153153
microLeap();
154154
spec.fn();
155+
spec.isActive = false;
155156
} else {
156157
remainingTimers.add(spec);
157158
}

0 commit comments

Comments
 (0)