View source for Module:Hatnote/testcases
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local mHatnote = require('Module:Hatnote/sandbox') -- the module to be tested
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()
function suite:assertError(func, ...)
local success, result = pcall(func, ...)
self:assertFalse(success)
end
function suite:assertNotEquals(expected, actual)
self:assertTrue(expected ~= actual)
end
function suite:assertParentFrameCallEquals(expected, func, args)
args = args or {}
local current = mw.getCurrentFrame()
local parent = current:newChild{title = 'Parent', args = args}
local child = parent:newChild{title = 'Child'}
self:assertEquals(expected, func(child))
end
000
1:0
Template used on this page:
Return to Module:Hatnote/testcases.