aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular-mocks.js
diff options
context:
space:
mode:
authorIgor Minar2011-07-17 00:47:11 -0700
committerIgor Minar2011-07-18 12:12:54 -0700
commit4c6d26a38f977f61d4deaacfd6b6c71f331e8065 (patch)
treefc291897c2e61097f2cabdf1963ed752704fd24a /src/angular-mocks.js
parentc43ce91b2534fe36994fd74cf8d159e54909d8ca (diff)
downloadangular.js-4c6d26a38f977f61d4deaacfd6b6c71f331e8065.tar.bz2
fix(strict mode): fix all issues discovered by strict mode and unit/e2e tests
Diffstat (limited to 'src/angular-mocks.js')
-rw-r--r--src/angular-mocks.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/angular-mocks.js b/src/angular-mocks.js
index 9154f8b5..2590c122 100644
--- a/src/angular-mocks.js
+++ b/src/angular-mocks.js
@@ -523,7 +523,8 @@ function TzDate(offset, timestamp) {
};
//hide all methods not implemented in this mock that the Date prototype exposes
- var unimplementedMethods = ['getMilliseconds', 'getTime', 'getUTCDay',
+ var self = this,
+ unimplementedMethods = ['getMilliseconds', 'getUTCDay',
'getUTCMilliseconds', 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
@@ -531,7 +532,7 @@ function TzDate(offset, timestamp) {
'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
angular.forEach(unimplementedMethods, function(methodName) {
- this[methodName] = function() {
+ self[methodName] = function() {
throw {
name: "MethodNotImplemented",
message: "Method '" + methodName + "' is not implemented in the TzDate mock"