aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2021-03-25 15:08:22 +0000
committerMatthew Wild <mwild1@gmail.com>2021-03-25 15:08:22 +0000
commitd1ccd87d551b9f10631eff3632801327aef0c09b (patch)
treea8ad09b4b5697beceab128f19b0ce50c7a77c40e /spec
parentfec0d44e89f58dae50063be87a6d9360e012f205 (diff)
downloadprosody-d1ccd87d551b9f10631eff3632801327aef0c09b.tar.gz
prosody-d1ccd87d551b9f10631eff3632801327aef0c09b.zip
util.promise: Switch order of parameters to join()
This saves awkward fiddlery with varargs and also echoes the signature of pcall/xpcall.
Diffstat (limited to 'spec')
-rw-r--r--spec/util_promise_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/util_promise_spec.lua b/spec/util_promise_spec.lua
index f64702bf..307c094a 100644
--- a/spec/util_promise_spec.lua
+++ b/spec/util_promise_spec.lua
@@ -498,10 +498,10 @@ describe("util.promise", function ()
local res1, res2;
local p1, p2 = promise.new(function (resolve) r1 = resolve end), promise.new(function (resolve) r2 = resolve end);
- local p = promise.join(p1, p2, function (_res1, _res2)
+ local p = promise.join(function (_res1, _res2)
res1, res2 = _res1, _res2;
return promise.resolve("works");
- end);
+ end, p1, p2);
local result;
local cb = spy.new(function (v)