franela / goblin

Minimal and Beautiful Go testing framework
MIT License
887 stars 79 forks source link

fix async after each (was executed after the end) #87

Closed schmurfy closed 4 years ago

schmurfy commented 4 years ago

aftereach callbacks were executed before the test was done

marcosnils commented 4 years ago

hey @schmurfy can we add a test for this?

schmurfy commented 4 years ago

okay I will give it a try

schmurfy commented 4 years ago

I added a test and fixed and another issue I got bitten by without knowing: the order in which the after blocks are executed were wrong, local afters should be executed first, a simple example would be connecting to an external database in a before and closing it in an after.

marcosnils commented 4 years ago

Loved this. Thx for fixing it