UNPKG

chai-callslike

Version:

A simple sinon-chai assertion to validate many aspects of stub calls

11 lines (10 loc) 384 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isStub = void 0; function isStub(actualCall) { var _a; if (((_a = actualCall === null || actualCall === void 0 ? void 0 : actualCall.args) === null || _a === void 0 ? void 0 : _a.length) === undefined) { throw new Error(`Not a stub! ${actualCall}`); } } exports.isStub = isStub;