Open angadn opened 6 years ago
This is not a problem that is unique to OKGO. BDD Testing frameworks that expose a closure-driven API also have the same issue. Unless we have a simple enough variant within the extent of the current paradigm to allow for defer
s, we should probably drop this as a WONTFIX
Since each block of OKGO is within its own isolated function,
defer
statements that spread out across multiple blocks can't be used. Hence, references have to be shared across blocks and one mustn't forget to cleanup in the final block.