"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Spy = void 0;
class Spy {
    called = false;
    calledArgs = [];
    constructor(obj, methodName) {
        const savedFn = obj[methodName];
        const spy = this;
        obj[methodName] = function () {
            const args = Array.from(arguments);
            spy.called = true;
            spy.calledArgs.push(args);
            savedFn.apply(obj, args);
        };
    }
}
exports.Spy = Spy;
