Module:Wd/sandbox/testcases/common
Appearance
-- generates unit test object to be returned by a specific testcase module
-- first argument: name of the module to test
-- second argument: a table with the structure described in testcaseTable or a module name used for reference values
function generate_unit_tests_object(module_to_test, correct_outputs)
local p = require("Module:UnitTests")
-- TODO: handle the testcase 3
function p:test()
self:preprocess_equals_many(
"{{#invoke:" .. module_to_test .. "|",
"}}",
correct_outputs
)
end
return p
end