ts-mockery
Version:
Yet another typescript mocking library.
22 lines • 713 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.JestAdapter = void 0;
var JestAdapter = (function () {
function JestAdapter() {
}
JestAdapter.prototype.getSpy = function () {
return jest.fn();
};
JestAdapter.prototype.spyAndCallFake = function (object, key, stub) {
jest.spyOn(object, key).mockImplementation(stub);
object[key].mockClear();
};
JestAdapter.prototype.spyAndCallThrough = function (object, key) {
if (typeof object[key] === typeof Function) {
jest.spyOn(object, key);
}
};
return JestAdapter;
}());
exports.JestAdapter = JestAdapter;
//# sourceMappingURL=jest-adapter.js.map