test(util) add exec.ret

This commit is contained in:
coderaiser 2014-05-23 03:13:03 -04:00
parent 7332c7b325
commit 89cc120017

View file

@ -79,6 +79,22 @@
});
});
describe('exec.ret', function() {
it('should return function that try to call callback', function() {
var STR = 'hello world',
func1 = function() {
var args = Util.slice(arguments);
return args.join(' ');
},
func2 = Util.exec.ret(func1, 'hello'),
str = func2('world');
str.should.be.equal(STR);
});
});
describe('exec.parallel', function() {
it('should execute a couple functions async and return results in callback', function() {
var WORD = 'hello world',