synchronize
Advanced tools
Comparing version 0.7.0 to 0.8.0
{ | ||
"name" : "synchronize", | ||
"main" : "./sync", | ||
"version" : "0.7.0", | ||
"version" : "0.8.0", | ||
"homepage" : "http://alexeypetrushin.github.com/synchronize", | ||
@@ -6,0 +6,0 @@ "dependencies" : { |
@@ -12,3 +12,4 @@ synchronize.js allows You write asynchronous code as if it's synchronous. | ||
- [James Manning](https://github.com/jamesmanning) | ||
- [ssafejava](https://github.com/ssafejava) | ||
Copyright (c) Alexey Petrushin, http://petrush.in, released under the MIT license. |
@@ -192,3 +192,3 @@ var Fiber = require('fibers') | ||
fiber._syncParallel = {called: 0, returned: 0, results: []} | ||
cb() | ||
cb.call(this) | ||
delete fiber._syncParallel | ||
@@ -205,4 +205,4 @@ } | ||
try { | ||
cb.call(that) | ||
done() | ||
var result = cb.call(that) | ||
done(null, result) | ||
} catch (error){ | ||
@@ -209,0 +209,0 @@ done(error) |
@@ -172,2 +172,12 @@ var sync = require('../sync') | ||
it('should return result from fiber', function(done){ | ||
sync.fiber(function(){ | ||
return 'some value' | ||
}, function(err, result){ | ||
expect(err).to.eql(null) | ||
expect(result).to.eql('some value') | ||
done() | ||
}) | ||
}) | ||
beforeEach(function(){ | ||
@@ -174,0 +184,0 @@ this.someKey = 'some value' |
Sorry, the diff of this file is not supported yet
192791
5903
14