function TestRunner.runPlan(A)local X=TestSession.new(A)local U=LifecycleHooks.new()local r=A:findNodes(function(A)return A.modifier==TestEnum.NodeModifier.Focus end)X.hasFocusNodes=#r>0 _G[JEST_TEST_CONTEXT]={blocks={};instance=nil;snapshotState=nil}local l=getfenv()if l.DateTime then X.results.startTime=(l.DateTime.now()).UnixTimestampMillis end TestRunner.runPlanNode(X,A,U)_G[JEST_TEST_CONTEXT]=nil return X:finalize()end

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
