3.1.1 • Published 5 years ago

sinon-called-with-diff v3.1.1

Weekly downloads
2,259
License
MIT
Repository
github
Last release
5 years ago

Sinon called with diff License NPM version Dependency Status Build Status Coverage Status

Add ability to show diff when args are different in sinon. You can also replace sinon with stub wich is drop-in replacement of sinon.stub() with diff support.

Install

npm i sinon sinon-called-with-diff --save

How to use?

const diff = require('sinon-called-with-diff');
const sinon = diff(require('sinon'));

const stub = sinon.stub();

stub('hello');

stub.calledWith('world');
// returns
false

Will produce output:

wrong arguments in functionStub
actual: [
  "hello"
]

expected: [
  "world"
]

License

MIT

3.1.1

5 years ago

3.1.0

5 years ago

3.0.0

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago