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

fix(ngMock): handle cases where injector is created before tests #10969

Merged
merged 1 commit into from
Feb 6, 2015
Merged

fix(ngMock): handle cases where injector is created before tests #10969

merged 1 commit into from
Feb 6, 2015

Conversation

shahata
Copy link
Contributor

@shahata shahata commented Feb 4, 2015

This caused an exception for people who created an injector before the tests actually began to run. Since the array was initialized only in beforeEach, anyone accessing it before that would throw. This is solved easily but initializing the array immediately.

Closes #10967

@@ -776,6 +776,9 @@ describe('ngMock', function() {

}

//this is only to make sure that we can create an injector outside of tests
angular.injector(['ng']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add this within a top level define with a test inside.

@lgalfaso
Copy link
Contributor

lgalfaso commented Feb 4, 2015

other than that, let's wait for a green from Travis (or something that looks like green) and land this

@lgalfaso
Copy link
Contributor

lgalfaso commented Feb 5, 2015

LGTM

This caused an exception for people who created an injector before the tests actually began to run. Since the array was initialized only in beforeEach, anyone accessing it before that would throw. This is solved easily but initializing the array immediately.

Closes #10967
@shahata shahata merged commit 898714d into angular:master Feb 6, 2015
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.

Angular fails to instantiate module ngLocale in tests after upgrade to 1.3.12
3 participants