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