aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers/lua/luassertx.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/helpers/lua/luassertx.lua')
-rw-r--r--tests/helpers/lua/luassertx.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/helpers/lua/luassertx.lua b/tests/helpers/lua/luassertx.lua
index 3eba3fa4..d6d24d8e 100644
--- a/tests/helpers/lua/luassertx.lua
+++ b/tests/helpers/lua/luassertx.lua
@@ -64,7 +64,15 @@ local function instanceof(_, arguments, _)
end
end
+local function capture(_, arguments, _)
+ return function(value)
+ arguments[1](value)
+ return true
+ end
+end
+
assert:register("matcher", "tbl_containing", tbl_containing)
assert:register("matcher", "list_containing", list_containing)
assert:register("matcher", "instanceof", instanceof)
+assert:register("matcher", "capture", capture)
assert:register("assertion", "wait_for", wait_for)