Created
February 12, 2014 15:01
-
-
Save kucherenko/8957052 to your computer and use it in GitHub Desktop.
Testing enviropment for sinon and jquery ajax
This file contains 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
beforeEach(function() { | |
env = sinon.sandbox.create(); | |
//stub all requests to server | |
$ajax = env.stub($, 'ajax'); | |
}); | |
afterEach(function() { | |
env.restore(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment