This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
1.2.0rc1 angular.mock.$LogProvider debugEnabled isDefined error #3612
Closed
Description
The angular-mocks.js is missing the namespace angular for angular.mock.$LogProvider debugEnabled isDefined check.
This causes exceptions in jasmine/karma unit tests when you have the following in your main app.js
app.config([
'$logProvider',
function ($logProvider) {
$logProvider.debugEnabled(true);
}
]);
angular-mocks.js 1.2.0rs1 has:
this.debugEnabled = function(flag) {
if (isDefined(flag)) {
debug = flag;
return this;
} else {
return debug;
}
};
Possibly should be:
this.debugEnabled = function(flag) {
if (angular.isDefined(flag)) {
debug = flag;
return this;
} else {
return debug;
}
};