Skip to content
A test double library for beater.
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.gitignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json
tsconfig.json

README.md

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/)

You can’t perform that action at this time.