avoid-async-callback-in-fake-async
Warns when an async callback is passed to FakeAsync
.
FakeAsync
implementation does not await an async callback and the test will pass even if it should not.
Example
❌ Bad:
void main() {
// LINT
FakeAsync().run((fakeAsync) async {
...
});
// LINT
fakeAsync((fakeAsync) async {
...
});
}
✅ Good:
void main() {
FakeAsync().run((fakeAsync) {});
fakeAsync((fakeAsync) {});
}