UNPKG

unmock-core

Version:

[![npm](https://img.shields.io/npm/v/unmock-core.svg)][npmjs] [![CircleCI](https://circleci.com/gh/unmock/unmock-js.svg?style=svg)](https://circleci.com/gh/unmock/unmock-js) [![codecov](https://codecov.io/gh/unmock/unmock-js/branch/dev/graph/badge.svg)](h

15 lines 520 B
"use strict"; 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