Jump to content

Module:PopulationFromWikidata/testcases: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Created page with '--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}}', '' ) end return p'
 
No edit summary
Line 5: Line 5:
local p = require("module:UnitTests")
local p = require("module:UnitTests")
function p:test1()
function p:test1()
self:preprocess_equals('{{#invoke:PopulationFromWikidata|ListForInfobox}}', ''
self:preprocess_equals('{{#invoke:PopulationFromWikidata|ListForInfobox}}', '')
self:preprocess_equals('{{#invoke:PopulationFromWikidata|ListForInfobox|wikidata=Q2821571}}', '')
)
end
end



Revision as of 03:59, 11 July 2022

--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