Module:Wd/testcases

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

function p:_test(frame)
	require('Module:Wd')
	local t = { a = 5, b = 6, }; return mw.dumpObject(copyTable(t))
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}}', '')
    self:preprocess_equals('{{#invoke:Wd/testcases|_test | hello}}', '')
end

return p