Module:Term/testcases/keys

From Space Station 14 Wiki
Revision as of 06:15, 25 May 2025 by Aliser (talk | contribs) (Created page with "local p = require('Module:Module:Term') -- the module to be tested local ScribuntoUnit = require('Module:ScribuntoUnit') local suite = ScribuntoUnit:new() local frame = mw.getCurrentFrame() local terms_json = mw:loadJsonData(p.terms_json_path and p.terms_json_path or error("failed to load terms json table: table path is not exported")) function suite:test_keys_casing() for key, _ in terms_json do self:assertEquals(string.lower(key), key) end end return suite")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Term/testcases/keys/doc

local p = require('Module:Module:Term') -- the module to be tested
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()

local frame = mw.getCurrentFrame()

local terms_json = mw:loadJsonData(p.terms_json_path and p.terms_json_path or error("failed to load terms json table: table path is not exported"))

function suite:test_keys_casing()
	for key, _ in terms_json do
		self:assertEquals(string.lower(key), key)
	end
end

return suite