beater-double
v0.2.0
Published
A test double library for beater.
Downloads
5
Maintainers
Readme
beater-double
A test double library for beater.
Installation
$ npm install --save-dev beater-double
Usage
import assert from 'assert';
import { spyFn } from 'beater-double';
const f = spyFn((...ns: number[]) => JSON.stringify(ns));
assert.deepStrictEqual(f(123), '[123]');
assert.deepStrictEqual(f(456, 789), '[456,789]');
assert.deepStrictEqual(f.calls, [[123], [456, 789]]);