FANDOM


local Tests = {}
 
function Tests.run(frame)
    local testFile = require("Module:" .. frame.args[1] .. "/test")
    local results = ""
    for k,v in pairs(testFile) do
        if v then
            results = results .. "<div style='font-family:monospace; color:#fff; font-weight:bold; padding:3px 5px; margin:3px 0px 0px 0px; background:#373;'>[" .. k .. "] OK</div>"
        else 
            results = results .. "<div style='font-family:monospace; color:#fff; font-weight:bold; padding:3px 5px; margin:3px 0px 0px 0px; background:#733;'>[" .. k .. "] FAIL</div>"
        end
    end
    return results
end
 
return Tests