Easy sandboxing sinon in mocha
describe 'Sample Test', ->
sandbox = sinon.sandbox.create()
afterEach ->
sandbox.restore()
it 'should stub something', ->
sandbox.stub(console, 'log')
Written by Christopher Garvis
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Coffeescript
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#