At the moment, cleanup is handled by simply running the cleanup after the test sub-tree:
|
loop (mapWithIndex indexer xs) <* lift (cleanup unit) |
This isn't great, as it doesn't get run in situations where the Aff was cancelled. We can fix this by using Aff's bracket.
IMO this would also lead to a simpler implementation of the afterAll beforeAll hook if a full bracket is encoded in the tree data type