aboutsummaryrefslogtreecommitdiffstats
path: root/tests/core/async/async_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core/async/async_spec.lua')
-rw-r--r--tests/core/async/async_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/core/async/async_spec.lua b/tests/core/async/async_spec.lua
index 88af14af..662e493a 100644
--- a/tests/core/async/async_spec.lua
+++ b/tests/core/async/async_spec.lua
@@ -36,6 +36,18 @@ describe("async", function()
)
it(
+ "should reject callback-style functions",
+ async_test(function()
+ local err = assert.has_error(function()
+ a.promisify(function(arg1, cb)
+ cb(arg1, nil)
+ end, true) "påskmust"
+ end)
+ assert.equals(err, "påskmust")
+ end)
+ )
+
+ it(
"should return all values",
async_test(function()
local val1, val2, val3 = a.wait(function(resolve)