fake_async 1.3.3
fake_async: ^1.3.3 copied to clipboard
Fake asynchronous events such as timers and microtasks for deterministic testing.
1.3.3 #
- Make the zone
create*TimerandscheduleMicrotaskbe responsible for running callbacks in the zone they're scheduled in, matching (new) standard zone behavior. (TheTimerconstructors and top-levelscheduleMicrotaskused to bind their callback, but now only registers it, leaving the zone to run in the correct zone and handle errors.) - Make periodic timers increment their
tickby more than one ifelapseBlockingadvanced time past multiple ticks.
1.3.2 #
- Require Dart 3.3
- Fix bug where a
flushTimersorelapsecall from within the callback of a periodic timer would immediately invoke the same timer. - Move to
dart-lang/testmonorepo.
1.3.1 #
- Populate the pubspec
repositoryfield.
1.3.0 #
FakeTimer.tickwill return a value instead of throwing.FakeAsync.includeTimerStackTraceallows controlling whether timers created with a FakeAsync will include a creation Stack Trace.
1.2.0 #
- Stable release for null safety.
1.2.0-nullsafety.3 #
- Update SDK constraints to
>=2.12.0-0 <3.0.0based on beta release guidelines.
1.2.0-nullsafety.2 #
- Allow prerelease versions of the 2.12 sdk.
1.2.0-nullsafety.1 #
- Allow 2.10 stable and 2.11.0 dev SDK versions.
1.2.0-nullsafety #
Pre-release for the null safety migration of this package.
Note that 1.2.0 may not be the final stable null safety release version,
we reserve the right to release it as a 2.0.0 breaking change.
This release will be pinned to only allow pre-release sdk versions starting
from 2.10.0-0.
1.1.0 #
- Exposed the
FakeTimerclass as a public class. - Added
FakeAsync.pendingTimerswhich gives access to all pending timers at the time of the call.
1.0.2 #
- Update min SDK to 2.2.0
1.0.1 #
- Update to lowercase Dart core library constants.
- Fix use of deprecated
isInstanceOfmatcher.
1.0.0 #
This release contains the FakeAsync class that was defined in quiver.
It's backwards-compatible with both the quiver version and the old version
of the fake_async package.
New Features #
- A top-level
fakeAsync()function was added that encapsulatesnew FakeAsync().run(...).
New Features Relative to quiver #
-
FakeAsync.elapsedreturns the total amount of fake time elapsed since theFakeAsyncinstance was created. -
new FakeAsync()now takes aninitialTimeargument that sets the default time for clocks created withFakeAsync.getClock(), and for theclockpackage's top-levelclockvariable.
New Features Relative to fake_async 0.1 #
-
FakeAsync.periodicTimerCount,FakeAsync.nonPeriodicTimerCount, andFakeAsync.microtaskCountprovide visibility into the events scheduled withinFakeAsync.run(). -
FakeAsync.getClock()provides access to fully-featuredClockobjects based onFakeAsync's elapsed time. -
FakeAsync.flushMicrotasks()empties the microtask queue without elapsing any time or running any timers. -
FakeAsync.flushTimers()runs all microtasks and timers until there are no more scheduled.
0.1.2 #
- Integrate with the clock package.