function TestRunner.runPlan(o)local A=TestSession.new(o)local P=LifecycleHooks.new()local c=o:findNodes(function(o)return o.modifier==TestEnum.NodeModifier.Focus end)A.hasFocusNodes=#c>0 _G[JEST_TEST_CONTEXT]={blocks={};instance=nil;snapshotState=nil}local G=getfenv()if G.DateTime then A.results.startTime=(G.DateTime.now()).UnixTimestampMillis end TestRunner.runPlanNode(A,o,P)_G[JEST_TEST_CONTEXT]=nil return A:finalize()end
--[[
	Runs the given TestPlan and returns a TestResults object representing the
	results of the run.
]]
function TestRunner.runPlan(plan)
	local session = TestSession.new(plan)
	local lifecycleHooks = LifecycleHooks.new()

	local exclusiveNodes = plan:findNodes(function(node)
		return node.modifier == TestEnum.NodeModifier.Focus
	end)

	session.hasFocusNodes = #exclusiveNodes > 0

	_G[JEST_TEST_CONTEXT] = {
		blocks = {},
		instance = nil,
		snapshotState = nil,
	}

	-- ROBLOX deviation START: adding startTime so that jest reporters can report time elapsed for tests
	local fenv = getfenv()
	-- ROBLOX NOTE: additional check as DateTime only exists in Luau and not in native Lua
	if fenv.DateTime then
		session.results.startTime = fenv.DateTime.now().UnixTimestampMillis
	end
	-- ROBLOX deviation END

	TestRunner.runPlanNode(session, plan, lifecycleHooks)

	_G[JEST_TEST_CONTEXT] = nil

	return session:finalize()
end
