The same thing happens if I put await GetStorage.init(); directly inside testWidgets(), but not if I put it into setUpAll(() async { }) block, as in all of the examples. However, I'd like to keep await GetStorage.init(); inside the main() function of the app, in order to test it successfully. What makes it hang unless I put it into setUpAll()? And is there any workaround for this?
Hi folks,
I'm trying to test a
main()
function called from inside an integration test, however it seems to hang the test indefinitely:The same thing happens if I put
await GetStorage.init();
directly insidetestWidgets()
, but not if I put it intosetUpAll(() async { })
block, as in all of the examples. However, I'd like to keepawait GetStorage.init();
inside themain()
function of the app, in order to test it successfully. What makes it hang unless I put it intosetUpAll()
? And is there any workaround for this?Thanks