-- Unit tests for [[Module:Wd]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p._test(frame)
require('Module:Wd').property(frame)
local t = { a = 5, b = 6, };
--loadSubmodules(frame)
loadSubmodules()
return mw.dumpObject(copyTable(t)) .. "\n\n" ..
frame:getTitle() .. "\n\n" ..
errorText("unknown-data-type")
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