Commit f636fa48 authored by JC Brand's avatar JC Brand

mock: Allow for settings to be passed in first

parent 501c9f5e
......@@ -109,12 +109,22 @@
};
};
mock.initConverseWithAsync = function (func, settings) {
mock.initConverseWithAsync = function (settings, func) {
if (_.isFunction(settings)) {
var _func = settings;
settings = func;
func = _func;
}
return function (done) {
return func(done, initConverse(settings));
};
};
mock.initConverse = function (func, settings) {
mock.initConverse = function (settings, func) {
if (_.isFunction(settings)) {
var _func = settings;
settings = func;
func = _func;
}
return function () {
return func(initConverse(settings));
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment