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

Commit 6d23591

Browse files
hammerdrpetebacondarwin
authored andcommitted
fix(angular-mocks): add inline dependency annotation
Annotation allows the angular-mocks to be minified, which sometimes happens with frameworks that automatically process files before running tests. Also, some developers have been using this library in code for their applications. This is not recommended as the library is only designed to support testing and not production applications. If you are likely to want to use the code here in production you would be best forking and maintaining your own version of the code as we will not guarantee that we won't break the annotation of the code in the future. Closes #4448
1 parent 18ae985 commit 6d23591

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ngMock/angular-mocks.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1726,9 +1726,9 @@ angular.module('ngMock', ['ng']).provider({
17261726
$interval: angular.mock.$IntervalProvider,
17271727
$httpBackend: angular.mock.$HttpBackendProvider,
17281728
$rootElement: angular.mock.$RootElementProvider
1729-
}).config(function($provide) {
1729+
}).config(['$provide', function($provide) {
17301730
$provide.decorator('$timeout', angular.mock.$TimeoutDecorator);
1731-
});
1731+
}]);
17321732

17331733
/**
17341734
* @ngdoc overview
@@ -1739,9 +1739,9 @@ angular.module('ngMock', ['ng']).provider({
17391739
* Currently there is only one mock present in this module -
17401740
* the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
17411741
*/
1742-
angular.module('ngMockE2E', ['ng']).config(function($provide) {
1742+
angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
17431743
$provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
1744-
});
1744+
}]);
17451745

17461746
/**
17471747
* @ngdoc object

0 commit comments

Comments
 (0)