From d39e46db31c9b2eee458ca59a814ebc4fe8a5bd5 Mon Sep 17 00:00:00 2001 From: William Boman Date: Wed, 14 Sep 2022 17:58:11 +0200 Subject: refactor: store link state in install context object (#419) --- tests/helpers/lua/luassertx.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/helpers/lua/luassertx.lua') 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) -- cgit v1.2.3-70-g09d2