"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var spy_1 = require("./spy");
var RestorableSpy = (function (_super) {
__extends(RestorableSpy, _super);
function RestorableSpy(target, functionName) {
_super.call(this, target[functionName], target);
this._functionName = functionName;
this._target = target;
}
RestorableSpy.prototype.restore = function () {
this._target[this._functionName] = this.originalFunction;
};
return RestorableSpy;
}(spy_1.Spy));
exports.RestorableSpy = RestorableSpy;
//# sourceMappingURL=restorable-spy.js.map |