Jump to content

Module:Template invocation/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ans (talk | contribs) at 11:34, 16 November 2018 (Created page with '-- Example Unit tests for Module:Bananas. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_hello() local mTemplateInvoca...'). 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)
-- Example Unit tests for [[Module:Bananas]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_hello()
	local mTemplateInvocation = require('Module:Template invocation')
	return mTemplateInvocation.invocation('foo', {'bar', 'baz', abc = 'def'})
	-- self:preprocess_equals('{{#invoke:Template invocation | hello}}', 'Hello, world!')
end

return p