Module:Namespace detect/testcases: Difference between revisions

Content deleted Content added
adding the function name would be helpful
test the sandbox
Line 1:
-- Example Unit tests for [[Module:Namespace detect]]. Click talk page to run tests.
local p = require('Module:UnitTests')
local nsDetect = require('Module:Namespace detect/sandbox')._main
 
function p:test_template_testcases_page()
Line 238:
 
function p:test_returning_false()
self:equals('Return false from article', nsDetect{page = 'Wikipedia', main = false}, false)
self:equals('Return false from talk page', nsDetect{page = 'Talk:Wikipedia', main = true, talk = false}, false)
self:equals('Return false from category page', nsDetect{page = 'Category:Wikipedians', main = true, talk = true, category = false}, false)
end