Dart – How run a function after or before each test?
add a setUp(() { add your code here}) before your test() function. There is also a tearDown() which is run after each test. If you add the setUp function at top level in main it is run for every test, if you put it inside a group it is run for every test in that … Read more