Having an await in the main() function outside of test/setUp functions can cause a race condition sometimes resulting in an "Bad state: Can't call test() once tests have begun running." error.
It would be nice to have a lint for this.
See flutter/flutter#182306 for an example of us encountering/fixing this issue in a test.
Having an
awaitin the main() function outside of test/setUp functions can cause a race condition sometimes resulting in an "Bad state: Can't call test() once tests have begun running." error.It would be nice to have a lint for this.
See flutter/flutter#182306 for an example of us encountering/fixing this issue in a test.