UNPKG

testdouble

Version:

A minimal test double library for TDD with JavaScript

15 lines (14 loc) • 468 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const lodash_1 = require("../wrap/lodash"); const is_callback_1 = require("../matchers/is-callback"); const callback_1 = require("../callback"); function default_1(type, args) { if (type === 'thenCallback' && !lodash_1.default.some(args, is_callback_1.default)) { return args.concat(callback_1.default); } else { return args; } } exports.default = default_1;