I would like to create a test using swift-testing for code isolated to MainActor. The test should have both configuration and cleanup logic also isolated to MainActor.
I found that I can create a class isolated to MainActor with configuration in init and cleanup in deinit. The problem here is that the deinit is not isolated to MainActor. Is there an alternative approach that could be used to achieve what I want?