Module:frame test

Hello, you have come here looking for the meaning of the word Module:frame test. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:frame test, but we will also tell you about its etymology, its characteristics and you will know how to say Module:frame test in singular and plural. Everything you need to know about the word Module:frame test you have here. The definition of the word Module:frame test will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:frame test, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

Allows easier testing of template-invokable functions that take a frame object as the only argument.

-- Equivalent to {{grc-IPA|ἁγιότης}}
require "Module:frame test".test_frame_function(require "Module:grc-pronunciation".create, {}, { "ἁγιότης" })

local export = {}

local parent_frame = {}

-- parent_frame.args is set below.
local function get_parent_frame()
	return parent_frame
end

-- frame_args: table; parent_frame_args: table; title: string (full pagename)
function export.test_frame_function(func, frame_args, parent_frame_args, title)
	parent_frame.args = parent_frame_args
	local frame = { args = frame_args, getParent = get_parent_frame }
	if title then
		-- Not always reliable and maybe dangerous.
		mw.title.getCurrentTitle = function ()
			return mw.title.new(title)
		end
	end
	return func(frame)
end

return export