Module:Wd/testcases: Difference between revisions

Content deleted Content added
Created page with '-- Example Unit tests for Module:Bananas. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_hello() self:preprocess_eq...'
 
Update
Tags: Mobile edit Mobile web edit
 
(225 intermediate revisions by 5 users not shown)
Line 1:
For performance reasons, the test cases have been divided over several subpages:
-- Example Unit tests for [[Module:Bananas]]. Click talk page to run tests.
local p = require('Module:UnitTests')
 
* [[Module:Wd/testcases/1]] – compares the output of [[Module:Wd]] against expected values
function p:test_hello()
* [[Module:Wd/testcases/2]] – compares the output of [[Module:Wd/sandbox]] against expected values
self:preprocess_equals('{{#invoke:Bananas | hello}}', 'Hello, world!')
* [[Module:Wd/testcases/3]] – compares the output of [[Module:Wd/sandbox]] against the output of [[Module:Wd]]
end
As of 2023, a new version of testcases is being prepared at [[Module:Wd/sandbox/testcases]].
 
function p:test()
self:preprocess_equals('{{#invoke:property }}', '')
self:preprocess_equals('{{#invoke:property | hello}}', '')
end
 
return p