This is a port of caolan's Async.js lib into lua
By now, only async.eachSeries
and async.mapSeries
has been implementated
local async = require("lib.async")
local FIXTURE01 = { "first", "second", "third", "fourth", "fifth" }
local processor = function(item, next)
print("[processor] item:" .. tostring(item))
next()
end
async.eachSeries(FIXTURE01, processor, function(err)
assert((err == nil))
end
)
for more, please refer to eachSeries and mapSeries
Test specs are written in moonscript on busted
To run tests, do:
busted spec/