Fandom Developers Wiki
Advertisement

This module contains testcases for its parent module, Utility.

See also[]


-- <nowiki>
-- Unit tests for [[Global Lua Modules/Utility]].
-- @see [[Module talk:Utility/testcases]]
return {
    getArgs = { -- function name
        options = {
            mode   = 'invocation',
            nowiki = true
        },
        tests = {
            -- Not containing parameters.
            {        '',      '' },
            -- Parameters available to hardcode.
            {     'aaa', 'table' },
            { 'aaa|aaa', 'table' }
        }
    },
    getdate = {
        options = {
            mode   = 'method',
            nowiki = true
        },
        tests = {
            { '2010-02-22', os.time({month=2,year=2010,day=22}) }
        }
    }
}
-- </nowiki>
Advertisement