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

fix($exceptionHandlerProvider): call inject() to run tests #10563

Closed
wants to merge 1 commit into from
Closed

fix($exceptionHandlerProvider): call inject() to run tests #10563

wants to merge 1 commit into from

Conversation

DavidSouther
Copy link
Contributor

In the current angular-mocksSpec, the tests for $exceptionHandlerProvider
call module to run tests on $exceptionHandlerProvider.mode(), but do
not call inject() to pump the module definitions.

In the current angular-mocksSpec, the tests for $exceptionHandlerProvider
call `module` to run tests on `$exceptionHandlerProvider.mode()`, but do
not call `inject()` to pump the module definitions.
@@ -592,22 +592,29 @@ describe('ngMock', function() {
}));


it('should log exceptions', module(function($exceptionHandlerProvider) {
$exceptionHandlerProvider.mode('log');
var $exceptionHandler = $exceptionHandlerProvider.$get();
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this call to $get enough here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, because the code in the module() block does not get executed. I have a branch that verifies the (lack of) executing code using console.log.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. Great. Let's get this merged.

@DavidSouther
Copy link
Contributor Author

I'm not sure why Travis failed - https://travis-ci.org/angular/angular.js/builds/44946893 - I don't think that's my fault?

@petebacondarwin
Copy link
Contributor

Travis is flaky. I landed this. Thanks!

petebacondarwin pushed a commit that referenced this pull request Dec 23, 2014
In the current angular-mocksSpec, the tests for $exceptionHandlerProvider
call `module` to run tests on `$exceptionHandlerProvider.mode()`, but do
not call `inject()` to pump the module definitions.

Closes #10563
petebacondarwin pushed a commit that referenced this pull request Dec 23, 2014
In the current angular-mocksSpec, the tests for $exceptionHandlerProvider
call `module` to run tests on `$exceptionHandlerProvider.mode()`, but do
not call `inject()` to pump the module definitions.

Closes #10563
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.

3 participants