Content deleted Content added
No edit summary |
Prune code duplication |
||
Line 1:
UnitTests provides a unit test facility that can be used by other scripts using '''require'''. See [[Wikipedia:Lua#Unit_testing]] for details. Following is a sample from [[Module:Bananas/testcases]]:
The talk page [[Module talk:Bananas/testcases]] executes it with <code><nowiki>{{#invoke: Bananas/testcases | run_tests}}</nowiki></code>. Test methods like test_hello above must begin with "test".
|