stubo
stubo (pronounced stub-oh) is a simple JavaScript stubbing component. It's useful for creating stub objects for AngularJS tests or proxyquire tests.
Why not Sinon?
Sinon is a great library that supports stubbing. But unfortunately it only supports stubbing one level deep.
Installation
npm i --save stubo
Example
stubo
converts this:
var stub = window: localStorage: { return 'data' } length: 1
to this:
var stubo = var stub = {}
License
MIT