UNPKG

429 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const spying_1 = require("../spying");
4function SpyOn(target, functionName) {
5 if (target[functionName] instanceof Function) {
6 return new spying_1.RestorableFunctionSpy(target, functionName);
7 }
8 else {
9 throw new TypeError(`${functionName} is not a function.`);
10 }
11}
12exports.SpyOn = SpyOn;
13//# sourceMappingURL=spy-on.js.map
\No newline at end of file