1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const spying_1 = require("../spying");
|
4 | function 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 | }
|
12 | exports.SpyOn = SpyOn;
|
13 | //# sourceMappingURL=spy-on.js.map |
\ | No newline at end of file |