1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1× 1× 204× 204× 2655× 2655× 2648× 2655× 204× 204× 1× | "use strict"; var _namespace_1 = require("./_namespace"); function SpyOn(target, functionName) { var spy = new _namespace_1.Spy(target[functionName], target); target[functionName] = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } return spy.call(args); }; // expose spy's calls on function target[functionName].calls = spy.calls; return spy; } exports.SpyOn = SpyOn; //# sourceMappingURL=spy-on.js.map |