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

Easy sandboxing sinon in mocha

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

  afterEach ->
    sandbox.restore()

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