Module:TemplateDataDoc/testcases

-- Unit tests for Module:TemplateDataDoc. Click talk page to run tests.

local ScribuntoUnit = require( 'Module:ScribuntoUnit' ) local suite = ScribuntoUnit:new local libName = 'TemplateDataDoc'

-- Helper to run all tests using sandbox version of the library from the debug console. To run against main lib, use =p.run function suite.runSandbox local frame = mw.getCurrentFrame:newChild{ title='testcases', args={ module=libName .. '/sandbox', displayMode='log' } } return suite.run( frame ) end

-- Allow test runner to use the sandbox and the primary versions of the library with the same testcases function suite:module return require( 'Module:' .. ( self.frame and self.frame.args.module or libName ) ) end

return suite