Created
September 28, 2013 16:04
-
-
Save PhoSor/6743564 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 Chain = require('chain'); | |
var mockMakeAjaxRequestAndReturnCallback = require('mockMakeAjaxRequestAndReturnCallback'); | |
var mockRenderData = require('mockRenderData'); | |
var generateLink = function (domain) { | |
return 'http://' + domain + '/resource'; | |
}; | |
var renderData = function (data) { | |
mockRenderData(data); | |
}; | |
Chain(). | |
defer(function(n, done) { | |
mockMakeAjaxRequestAndReturnCallback('/domain', done); | |
}). | |
then(generateLink). | |
defer(mockMakeAjaxRequestAndReturnCallback). | |
then(renderData). | |
end(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment