Jump to content

Module:Example/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dcoetzee (talk | contribs) at 00:47, 25 February 2013 (Created page with '-- Unit tests for Module:Bananas. Click talk page to run tests. local UnitTests = require('Module:UnitTests') local p = UnitTests.UnitTester:new() function p...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
-- Unit tests for [[Module:Bananas]]. Click talk page to run tests.
local UnitTests = require('Module:UnitTests')
local p = UnitTests.UnitTester:new()
function p.run_tests(frame) return p:run(frame) end

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

return p