From b9d8eaccf941b9ead9b98ca15642c18b4b0e8296 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 14 Jun 2018 19:05:27 +0200 Subject: Add possibility to create custom test function Change-Id: I83de0cc0edce37cb0d512fce0cec560659f625a7 Signed-off-by: Romain Forlot --- conf.d/project/lua.d/aft.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'conf.d/project') diff --git a/conf.d/project/lua.d/aft.lua b/conf.d/project/lua.d/aft.lua index dfaa80d..c0f047a 100644 --- a/conf.d/project/lua.d/aft.lua +++ b/conf.d/project/lua.d/aft.lua @@ -161,6 +161,12 @@ function _AFT.testVerbError(testName, api, verb, args, cb) end}) end +function _AFT.testCustom(testName, testFunction) + table.insert(_AFT.tests_list, {testName, function() + testFunction() + end}) +end + --[[ Make all assertions accessible using _AFT and declare some convenients aliases. -- cgit 1.2.3-korg