Difference between revisions of "Template:Documentation/preload-module-testcases"
Jump to navigation
Jump to search
test>Gonnym (No reason why this needs to be manually changed by users. It should automatically have the actual module name.) |
m (5 revisions imported) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 4: | Line 4: | ||
-- Example unit test. | -- Example unit test. | ||
function p:test_hello() | function p:test_hello() | ||
| − | self:preprocess_equals('{{#invoke: | + | self:preprocess_equals('{{#invoke:Example | hello}}', 'Hello, world!') |
end | end | ||
return p | return p | ||
Latest revision as of 10:24, 7 September 2020
-- Unit tests for Module:Documentation. Click talk page to run tests. local p = require('Module:UnitTests')
-- Example unit test. function p:test_hello() self:preprocess_equals('Hello World!', 'Hello, world!') end
return p