function TestNode.expand(S)local z=getfenv(S.callback)local m=setmetatable({},{__index=z})for S,z in pairs(S.environment)do m[S]=z end setfenv(S.callback,m)local r,Y=xpcall(S.callback,debug.traceback)if not r then S.loadError=Y end end local S={}S.__index=S
--[[
	Expand a node by setting its callback environment and then calling it. Any
	further it and describe calls within the callback will be added to the tree.
]]
function TestNode:expand()
	local originalEnv = getfenv(self.callback)
	local callbackEnv = setmetatable({}, { __index = originalEnv })
	for key, value in pairs(self.environment) do
		callbackEnv[key] = value
	end
	setfenv(self.callback, callbackEnv)

	local success, result = xpcall(self.callback, debug.traceback)

	if not success then
		self.loadError = result
	end
end

local TestPlan = {}
TestPlan.__index = TestPlan
