unmock-core
Version:
[][npmjs] [](https://circleci.com/gh/unmock/unmock-js) [](h
15 lines • 520 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const generated_1 = require("./generated");
exports.decorateSpy = (spy) => {
return Object.assign(spy, generated_1.decorators);
};
exports.verifyOnlyOneCall = ({ spy, errPrefix, }) => {
const callCount = spy.callCount;
if (callCount !== 1) {
throw Error(`${errPrefix}: Expected one matching call, got ${callCount} calls`);
}
return spy;
};
exports.default = exports.decorateSpy;
//# sourceMappingURL=decorate.js.map