Last Updated: February 25, 2016
·
2.386K
· cgarvis

Easy sandboxing sinon in mocha

describe 'Sample Test', ->
  sandbox = sinon.sandbox.create()

  afterEach ->
    sandbox.restore()

  it 'should stub something', ->
    sandbox.stub(console, 'log')