Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

feat(ngMock): destroy $rootScope after each test #13433

Closed

Conversation

andyrooger
Copy link
Contributor

Previously $rootScope would be new for each test, but old $rootScopes would never be destroyed.
Now that we are able to destroy the $rootScope, doing so provides an opportunity for code to clean
up things like long-lived event handlers between tests.

@andyrooger andyrooger force-pushed the destroy-rootscope-in-tests branch from 41eb9b6 to be1e6fd Compare December 3, 2015 01:52
Previously $rootScope would be new for each test, but old $rootScopes would never be destroyed.
Now that we are able to destroy the $rootScope, doing so provides an opportunity for code to clean
up things like long-lived event handlers between tests.
@petebacondarwin
Copy link
Contributor

Looks good - thanks @andyrooger

@andyrooger
Copy link
Contributor Author

Brilliant. Cheers @petebacondarwin

gkalpak pushed a commit that referenced this pull request Feb 22, 2016
Previously $rootScope would be new for each test, but old $rootScopes would never be destroyed.
Now that we are able to destroy the $rootScope, doing so provides an opportunity for code to clean
up things like long-lived event handlers between tests.

Closes #13433
@gkalpak
Copy link
Member

gkalpak commented Feb 22, 2016

Backported to v1.4.x as e55829a (as discussed with @petebacondarwin).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants