Jump to content

Module:PopulationFromWikidata/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by MaiaCWilliams (talk | contribs) at 03:59, 11 July 2022. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
--Test cases for the sandbox version of the PopulationFromWikidata module. This is a Lua module for testing the sandbox module.

-- we inherit p from another module
-- UnitTests is a system of testing modules. We'll expose the outputs of tests. 
local p = require("module:UnitTests")
function p:test1()
	self:preprocess_equals('{{#invoke:PopulationFromWikidata|ListForInfobox}}', '')
	self:preprocess_equals('{{#invoke:PopulationFromWikidata|ListForInfobox|wikidata=Q2821571}}', '')
end


return p