Skip to content

Instantly share code, notes, and snippets.

@kucherenko
Created February 12, 2014 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kucherenko/8957052 to your computer and use it in GitHub Desktop.
Save kucherenko/8957052 to your computer and use it in GitHub Desktop.
Testing enviropment for sinon and jquery ajax
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