fake_async icon indicating copy to clipboard operation
fake_async copied to clipboard

Add FakeAsync.runNextTimer

Open gnprice opened this issue 1 year ago • 2 comments

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:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

gnprice avatar Jun 06 '24 03:06 gnprice

I think this looks like a sensible API. I'll double check this doesn't impact existing internal usage. @lrhn any concerns?

natebosch avatar Jun 28 '24 00:06 natebosch

No impact to internal usage, so this is safe to land after review.

natebosch avatar Jun 28 '24 16:06 natebosch

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.

gnprice avatar Oct 02 '24 03:10 gnprice

Gentle ping again. I've just merged from main to resolve the conflict in CHANGELOG.md from dart-lang/fake_async#89.

gnprice avatar Oct 17 '24 07:10 gnprice

Closing as the dart-lang/fake_async repository is merged into the dart-lang/test monorepo. Please re-open this PR there!

mosuem avatar Oct 18 '24 08:10 mosuem