Jump to content

Module:EditAtWikidata/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Zyxw (talk | contribs) at 09:09, 19 August 2018 (update). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Unit tests for [[Module:EditAtWikidata]]. Click talk page to run tests.

local p = require('Module:UnitTests')

function p:test1()
    self:preprocess_equals_preprocess(
        'Test{{#invoke:EditAtWikidata/sandbox|showMessage|qid=Q1}}',
        'Test{{#invoke:EditAtWikidata|showMessage|qid=Q1}}'
        )
end

function p:test1_nowiki()
    self:preprocess_equals_preprocess(
        'Test{{#invoke:EditAtWikidata/sandbox|showMessage|qid=Q1}}',
        'Test{{#invoke:EditAtWikidata|showMessage|qid=Q1}}',
        {nowiki=1}
    )
end

return p