UNPKG

testdouble

Version:

A minimal test double library for TDD with JavaScript

20 lines (19 loc) 570 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const create_1 = require("../create"); exports.default = () => { const captor = { capture: (0, create_1.default)({ name: 'captor.capture', matches(matcherArgs, actual) { return true; }, afterSatisfaction(matcherArgs, actual) { captor.values = captor.values || []; captor.values.push(actual); captor.value = actual; } }) }; return captor; };