Module:UnitTests/doc explained

UnitTests provides a unit test facility that can be used by other scripts using require. See for details. The following is a sample from :

The talk page executes it with <nowiki>{{#invoke: Example/testcases | run_tests}}</nowiki>. Test methods like test_hello above must begin with "test".

Methods

run_tests

preprocess_equals

self:preprocess_equals('', 'Hello, world!',)

preprocess_equals_many

self:preprocess_equals_many('',,)

preprocess_equals_preprocess

self:preprocess_equals_preprocess('', '',)

preprocess_equals_preprocess_many

self:preprocess_equals_preprocess_many('', '',,)

preprocess_equals_sandbox_many

self:preprocess_equals_sandbox_many('