Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a cleanup method to destroy the dependency context (for unit tests) #42

Open
werner77 opened this issue Apr 24, 2020 · 1 comment
Open
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@werner77
Copy link

For testing it's convenient to be able to destroy the context after each test and set it up before.

@werner77
Copy link
Author

Can be as easy as:

extension DependencyContext {
    static func destroy() {
        self.root = nil
    }
}

@benjohnde benjohnde added this to the 1.6.0 milestone May 18, 2020
@benjohnde benjohnde added enhancement New feature or request good first issue Good for newcomers labels May 18, 2020
@benjohnde benjohnde modified the milestones: 1.6.0, 1.7.0 Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants