fake_async
fake_async copied to clipboard
Add FakeAsync.runNextTimer
Fixes #84.
This method is like flushTimers, but runs just one timer and then returns. That allows the caller to write their own loop similar to flushTimers but with custom logic of their own.
- [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:
- See our contributor guide for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before creating a PR.
- Contributions to our repos should follow the Dart style guide and use
dart format. - Most changes should add an entry to the changelog and may need to rev the pubspec package version.
- Changes to packages require corresponding tests.
Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.
I think this looks like a sensible API. I'll double check this doesn't impact existing internal usage. @lrhn any concerns?
No impact to internal usage, so this is safe to land after review.
Ping. :-)
I just ran into another debugging situation where I needed this functionality (for the reasons in dart-lang/test#2318), and installed fake_async from this PR branch in order to get it. It'd be great to get it merged.
Gentle ping again. I've just merged from main to resolve the conflict in CHANGELOG.md from dart-lang/fake_async#89.
Closing as the dart-lang/fake_async repository is merged into the dart-lang/test monorepo. Please re-open this PR there!