- Require Dart 3.3
- Populate the pubspec
repository
field.
FakeTimer.tick
will return a value instead of throwing.FakeAsync.includeTimerStackTrace
allows controlling whether timers created with a FakeAsync will include a creation Stack Trace.
- Stable release for null safety.
- Update SDK constraints to
>=2.12.0-0 <3.0.0
based on beta release guidelines.
- Allow prerelease versions of the 2.12 sdk.
- Allow 2.10 stable and 2.11.0 dev SDK versions.
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
.
- Exposed the
FakeTimer
class as a public class. - Added
FakeAsync.pendingTimers
which gives access to all pending timers at the time of the call.
- Update min SDK to 2.2.0
- Update to lowercase Dart core library constants.
- Fix use of deprecated
isInstanceOf
matcher.
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.
- A top-level
fakeAsync()
function was added that encapsulatesnew FakeAsync().run(...)
.
-
FakeAsync.elapsed
returns the total amount of fake time elapsed since theFakeAsync
instance was created. -
new FakeAsync()
now takes aninitialTime
argument that sets the default time for clocks created withFakeAsync.getClock()
, and for theclock
package's top-levelclock
variable.
-
FakeAsync.periodicTimerCount
,FakeAsync.nonPeriodicTimerCount
, andFakeAsync.microtaskCount
provide visibility into the events scheduled withinFakeAsync.run()
. -
FakeAsync.getClock()
provides access to fully-featuredClock
objects 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.
- Integrate with the clock package.