వికీపీడియా:Lua: కూర్పుల మధ్య తేడాలు

→‎Unit testing: Let's keep the same name we use in Template namespaces.
చి →‎Unit testing: one more
పంక్తి 55:
A unit testing framework for Lua scripts on Wikipedia is available at [[Module:UnitTests]]. It allows you to execute your script on a given set of inputs and verify that the expected outputs are produced. Unit tests are especially useful for rapidly detecting regressions, where modifications to a script introduce new problems.
 
By convention, unit tests for a module like [[Module:Bananas]] are placed in [[Module:Bananas/testcases]], and are executed on [[Module talk:Bananas/testcases]] with e.g. <code><nowiki>{{#invoke: Bananas/testcases | run_tests}}</nowiki></code>. Test methods must begin with "test". A simple example from [[Module:Bananas/teststestcases]] is below.
<syntaxhighlight lang="lua">
-- Unit tests for [[Module:Bananas]]. Click talk page to run tests.
"https://te.wikipedia.org/wiki/వికీపీడియా:Lua" నుండి వెలికితీశారు