PackageTrack
Sign in Get early access

fake_async

Fake asynchronous events such as timers and microtasks for deterministic testing.

1.3.3 7.1M downloads/mo #86 most downloaded on pub.dev dart-lang/test

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Ships unpredictably

gaps range from 2 weeks to 2.3 years

Most releases are documented

notes for 9 of 11 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

16 releases · first in 2014

0 releases in the last 12 months

see the full history below

Release timeline

16 releases · Jul 2014 to Jan 2025
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 16
  1. 1.3.3 28 Jan 2025
    Release notes
    • Make the zone create*Timer and scheduleMicrotask be responsible for running callbacks in the zone they're scheduled in, matching (new) standard zone behavior. (The Timer constructors and top-level scheduleMicrotask used 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 tick by more than one if elapseBlocking advanced time past multiple ticks.
    Open source →
  2. 1.3.2 18 Oct 2024
    Release notes
    • Require Dart 3.3
    • Fix bug where a flushTimers or elapse call from within the callback of a periodic timer would immediately invoke the same timer.
    • Move to dart-lang/test monorepo.
    Open source →
  3. 1.3.1 15 Jun 2022
    Release notes
    • Populate the pubspec repository field.
    Open source →
  4. 1.3.0 16 Mar 2022
    Release notes
    • 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.
    Open source →
  5. 1.2.0 02 Feb 2021
    Release notes
    • Stable release for null safety.
    Open source →
  6. 1.2.0-nullsafety.3 03 Nov 2020 pre-release
    Release notes
    • Update SDK constraints to >=2.12.0-0 <3.0.0 based on beta release guidelines.
    Open source →
  7. 1.2.0-nullsafety.2 23 Oct 2020 pre-release
    Release notes
    • Allow prerelease versions of the 2.12 sdk.
    Open source →
  8. 1.2.0-nullsafety.1 22 Sep 2020 pre-release
    Release notes
    • Allow 2.10 stable and 2.11.0 dev SDK versions.
    Open source →
  9. 1.2.0-nullsafety 17 Aug 2020 pre-release
    Release notes

    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.

    Open source →
  10. 1.1.0 06 Apr 2020
    Release notes
    • Exposed the FakeTimer class as a public class.
    • Added FakeAsync.pendingTimers which gives access to all pending timers at the time of the call.
    Open source →
  11. 1.1.0-nullsafety 29 Jul 2020 pre-release

    Nothing published for this version

  12. 1.0.1 13 Jul 2018
    Release notes
    • Update to lowercase Dart core library constants.
    • Fix use of deprecated isInstanceOf matcher.
    Open source →
  13. 1.0.0 01 May 2018
    Release notes

    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 encapsulates new FakeAsync().run(...).

    New Features Relative to quiver

    • FakeAsync.elapsed returns the total amount of fake time elapsed since the FakeAsync instance was created.

    • new FakeAsync() now takes an initialTime argument that sets the default time for clocks created with FakeAsync.getClock(), and for the clock package's top-level clock variable.

    New Features Relative to fake_async 0.1

    • FakeAsync.periodicTimerCount, FakeAsync.nonPeriodicTimerCount, and FakeAsync.microtaskCount provide visibility into the events scheduled within FakeAsync.run().

    • FakeAsync.getClock() provides access to fully-featured Clock objects based on FakeAsync'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.

    Open source →
  14. 0.1.2 07 Oct 2014
    Release notes
    • Integrate with the clock package.
    Open source →
  15. 0.1.1 15 Sep 2014

    Nothing published for this version

  16. 0.1.0 21 Jul 2014

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive