This is the documentation page for Module:TestHarness
Scribunto unit test framework.
Documentation
Package items
th.code_cov(module_name, test_module, test_cases)
(function)- Code coverage analyser.
- Parameters:
module_name
Module name. (string)test_module
Test module package. (string)test_cases
Test case data. (string)
- Returns: Code coverage data. (table)
th.run_tests(f)
(function)- Test harness function.
- Parameter:
f
Scribunto frame object. (table) - Returns: Test report. (string)
utils.format_key(key, If)
(function)- Table index key formatter.
- Parameters:
key
Index key for Lua table. (string|number)If
false
, omits dot index. (boolean)
- Returns: Formatted table index. (string)
engine.test_table(member, case, options)
(function)- Unit tester for package methods.
- Parameters:
member
Test member. (table)case
Test case. (string|number)options
Test options. (table)
- Returns: Test case result data. (table)
See also
https://dev.fandom.com/wiki/Global_Lua_Modules/Testharness
- Created with Docbunto
See Also