flutter_advanced_networkimage icon indicating copy to clipboard operation
flutter_advanced_networkimage copied to clipboard

How to test

Open jeremymelchor opened this issue 5 years ago • 0 comments

Hi, I'm writing widget tests but I end up with a Timer error from the loadFromRemote method: Pending timers: Timer (duration: 0:00:03.796875, periodic: false), created: #0 new _FakeTimer._ (package:quiver/testing/src/async/fake_async.dart:277:42) #6 loadFromRemote.run (package:flutter_advanced_networkimage/src/utils.dart:343:20) <asynchronous suspension> #7 loadFromRemote.run (package:flutter_advanced_networkimage/src/utils.dart) #8 loadFromRemote (package:flutter_advanced_networkimage/src/utils.dart:355:24) #9 AdvancedNetworkImage._loadAsync (package:flutter_advanced_networkimage/src/provider/flutter_advanced_networkimage.dart:195:35) #10 AdvancedNetworkImage.load (package:flutter_advanced_networkimage/src/provider/flutter_advanced_networkimage.dart:165:14) #11 AdvancedNetworkImage.resolve.<anonymous closure>.<anonymous closure> (package:flutter_advanced_networkimage/src/provider/flutter_advanced_networkimage.dart:149:17)

I suppose the reason is it does not manage to load the image. How can you mock the image fetching ?

jeremymelchor avatar Jul 01 '20 12:07 jeremymelchor