Module:Template test case: Difference between revisions

    (fix for missing before or after parameters)
    (protect call templateObj:getOutput())
    Line 302: Line 302:


    function TestCase:getTemplateOutput(templateObj)
    function TestCase:getTemplateOutput(templateObj)
    local output = templateObj:getOutput()
    local protect = require('Module:Protect')
    -- calling templateObj:getOutput()
    local output = protect(templateObj.getOutput)(templateObj)
    if self.options.resetRefs then
    if self.options.resetRefs then
    mw.getCurrentFrame():extensionTag('references')
    mw.getCurrentFrame():extensionTag('references')