DIKit
DIKit copied to clipboard
Add a cleanup method to destroy the dependency context (for unit tests)
For testing it's convenient to be able to destroy the context after each test and set it up before.
Can be as easy as:
extension DependencyContext {
static func destroy() {
self.root = nil
}
}