Difference between revisions of "Template:Documentation/preload-module-testcases"
Jump to navigation
Jump to search
test>TheDJ (template) |
m (5 revisions imported) |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
| − | -- | + | -- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests. |
| − | local p = | + | local p = require('Module:UnitTests') |
| − | + | ||
| − | function p | + | -- Example unit test. |
| − | + | function p:test_hello() | |
| + | 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