Last active
March 24, 2016 14:05
-
-
Save jhartikainen/23557771ce0970bd8605 to your computer and use it in GitHub Desktop.
Manual Sinon sandboxes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('something', function() { | |
var sandbox; | |
beforeEach(function() { | |
sandbox = sinon.sandbox.create(); | |
}); | |
afterEach(function() { | |
sandbox.restore(); | |
}); | |
it('should do something with stubs', function() { | |
var someStub = sandbox.stub(thing, 'something'); | |
//stuff | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment