Module:Wd/testcases

This is an old revision of this page, as edited by Ans (talk | contribs) at 13:21, 6 October 2017. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Example Unit tests for [[Module:Bananas]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_hello()
    self:preprocess_equals('{{#invoke:Bananas | hello}}', 'Hello, world!')
end

function p:test()
    self:preprocess_equals('{{#invoke:Wd|property }}', '')
    self:preprocess_equals('{{#invoke:Wd|property | hello}}', '')
    self:preprocess_equals('{{#invoke:Wd|_property }}', '')
    self:preprocess_equals('{{#invoke:Wd|_property | hello}}', '')
end

return p