Module:Mainspace editnotice/testcases: Difference between revisions
Appearance
Content deleted Content added
start testcases |
switch to ScribuntoUnit |
||
Line 1: | Line 1: | ||
-- Unit tests for [[Module:Mainspace editnotice]]. Click talk page to run tests. |
-- Unit tests for [[Module:Mainspace editnotice]]. Click talk page to run tests. |
||
⚫ | |||
⚫ | |||
⚫ | |||
local suite = ScribuntoUnit:new() |
|||
⚫ | |||
notice, {nowiki=1}) |
|||
⚫ | |||
self:assertEquals( |
|||
mw.text.killMarkers(suite.frame:preprocess(notice)), |
|||
mw.text.killMarkers(suite.frame:preprocess( |
|||
⚫ | |||
) |
|||
end |
end |
||
function |
function suite:testBlp() |
||
self:assertNoticeEquals('Barack Obama', '{{BLP editintro}}') |
self:assertNoticeEquals('Barack Obama', '{{BLP editintro}}') |
||
end |
end |
||
return |
return suite |
Revision as of 17:08, 29 January 2024
![]() | This is the test cases page for the module Module:Mainspace editnotice. Results of the test cases. |
-- Unit tests for [[Module:Mainspace editnotice]]. Click talk page to run tests.
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()
function suite:assertNoticeEquals(page, notice)
self:assertEquals(
mw.text.killMarkers(suite.frame:preprocess(notice)),
mw.text.killMarkers(suite.frame:preprocess(
'{{#invoke:Mainspace editnotice|main|page='..page..'}}'))
)
end
function suite:testBlp()
self:assertNoticeEquals('Barack Obama', '{{BLP editintro}}')
end
return suite