Module:Anchor/testcases explained

-- Unit tests for . Click talk page to run tests.

local anchor = require('Module:Anchor') -- the module to be testedlocal ScribuntoUnit = require('Module:ScribuntoUnit')local suite = ScribuntoUnit:new

function suite:testmain self:assertResultEquals('

', '') self:assertResultEquals('', '') self:assertResultEquals('', '') self:assertResultEquals('', '') self:assertResultEquals('', '')end

function suite:test_main self:assertResultEquals('

', anchor._main('foo')) self:assertResultEquals('', anchor._main('foo', 'bar'))end

function suite:testAgainstTemplate self:assertSameResult('', '') self:assertSameResult('', '') self:assertSameResult('', '')end

return suite