Last active
December 11, 2015 04:28
-
-
Save elee/4544817 to your computer and use it in GitHub Desktop.
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
var sinon = require('sinon'); | |
var hottap = require('hotttap'); | |
var foo = function(url) { | |
var resp = hottap.hottap(url); | |
return resp; | |
}; | |
foo('http://somewhere/over/the/rainbow'); | |
and test: | |
describe('foo', function() { | |
it('should yank urls', function() { | |
var hottap = sinon.mock(hottap, 'hottap', function(url) { | |
return 'some silly json blob goes here'; | |
}); | |
foo('http://somewhere/else/over/the/rainbow'); | |
// asserts and such | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment