Jump to content

Module:Annotated link/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fred Gandt (talk | contribs) at 05:57, 27 January 2023 (+ test; will need a run up for this). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Unit tests for [[Module:AnnotatedLink]]. Run all tests on the talk page.
-- Due to the changable nature of short descriptions; some of these tests may need to be updated before running them.

local p = require('Module:UnitTests')

function p:basic()
	self:preprocess_equals('{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/explicit short description}}', "User:Fred Gandt/sandbox/explicit short description – explicit short description")
end

function p:display()
	self:preprocess_equals('{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/explicit short description|display=Test page}}', "Test page – explicit short description")
end

return p