Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

bouzuya/beater-double

Repository files navigation

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]]);

Badges

npm version Travis CI

License

MIT

Author

bouzuya <m@bouzuya.net> (https://bouzuya.net/)