Make spyOnProperty available in tests

Needed adding to the env and require interface
This commit is contained in:
Henry Blyth
2016-05-16 10:15:36 +01:00
committed by Joe Cellucci
parent 56191cfb2e
commit 8e23c26383
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -293,6 +293,10 @@ getJasmineRequireObj().Env = function(j$) {
return spyRegistry.spyOn.apply(spyRegistry, arguments); return spyRegistry.spyOn.apply(spyRegistry, arguments);
}; };
this.spyOnProperty = function() {
return spyRegistry.spyOnProperty.apply(spyRegistry, arguments);
};
var suiteFactory = function(description) { var suiteFactory = function(description) {
var suite = new j$.Suite({ var suite = new j$.Suite({
env: self, env: self,
+4
View File
@@ -56,6 +56,10 @@ getJasmineRequireObj().interface = function(jasmine, env) {
return env.spyOn(obj, methodName); return env.spyOn(obj, methodName);
}, },
spyOnProperty: function(obj, methodName, accessType) {
return env.spyOnProperty(obj, methodName, accessType);
},
jsApiReporter: new jasmine.JsApiReporter({ jsApiReporter: new jasmine.JsApiReporter({
timer: new jasmine.Timer() timer: new jasmine.Timer()
}), }),